How to install Node.js Environment ?(°ヘ°)?????
首先至官方網站看安裝的指導方針:
未來進入後端世界會用到很多套件 ,而且會推陳出新, 甚至公司及工程師不同也會使用不同套件, 要時常習慣不同套件.
Learing read Guide install and start , Basic English Import !!
Node.js > Download > 12.16.0 LTS.
LTS (long term support )
Node.js 的官方網站 https://nodejs.org 下載安裝.
安裝 Node.js 的方式:
- 直接官方下載安裝 _(不推薦)
2. 建置NVM (Node version Manager )環境
實務上常使用_Node Version Manager (nvm)。NVM
What is NVM package?
nvm (Node Version Manager) is a tool That allows you to download and install Node. js. …
Why need build this Envrionment ? It’s better than insatll form OS ?
When you take over different projects, it’s easy to get errors because the node.js versions that the project uses are different always , so use Node caould be Easy to switch version .
它讓開發者可以在電腦上同時安裝並切換使用不同版本的 Node.js
實務開發時,很常碰到不同專案使用不同版本 Node.js 的情況。NVM可以讓你減少重複安裝的錯誤
所以…你還在用官方直接下載嗎? 專案時你的程度就被比較出來瞜.
用Terminial 也比較帥呀. 假掰也很重要歐.
Build NVM on Terminial
nvm 安裝 Node.js
先查詢目前Node.js 當下的版本.
terminial : $ nvm ls -remote
terminial $ nvm install 12.16.0
我要提醒一下:
聽起來NVM和NPM功能非常相似, 事實上不一樣, 小編過去初學的時候曾經也會搞混.
NPM
npm (Node Package Manager) is a tool that allows you to install javascript packages.
Check if you have it installed via npm — version . next paper i will tell you
如果你 Google “nvm”,你會找到兩個 GitHub 的網址,他們分別是安裝在 macOS 與 Windows 的版本。