建立 Vue.js 專案的工具,對於 Node.js 工具熟悉的開發者,推薦使用 vue-cli。
1.安裝Node.js官方版本
https://nodejs.org/en/download/
Latest LTS Version: 8.12.0 (includes npm 6.4.1) 2018-09-26
2.Node.js 版本及更新常用指令
node -v #檢查 Node.js 的版本
更新 Node.js 到最新版本
Windows
C:\Users> npm cache clean -f #清除 npm 快取 C:\Users> npm install -g n #安裝 n,n 是管理 Node.js 版本的 module C:\Users> n stable #安裝穩定版的 Node.js C:\Users> node -v #確認目前的版本
Linux
[root@ip-1-31-37-203 ~]# nvm Node Version Manager Usage: nvm help Show this message nvm --version Print out the latest released version of nvm nvm install [-s] <version> Download and install a <version>, [-s] from source nvm uninstall <version> Uninstall a version nvm use <version> Modify PATH to use <version> nvm run <version> [<args>] Run <version> with <args> as arguments nvm current Display currently activated version nvm ls List installed versions nvm ls <version> List versions matching a given description nvm ls-remote List remote versions available for install nvm deactivate Undo effects of NVM on current shell nvm alias [<pattern>] Show all aliases beginning with <pattern> nvm alias <name> <version> Set an alias named <name> pointing to <version> nvm unalias <name> Deletes the alias named <name> nvm copy-packages <version> Install global NPM packages contained in <version> to current version Example: nvm install v0.10.24 Install a specific version number nvm use 0.10 Use the latest available 0.10.x release nvm run 0.10.24 myApp.js Run myApp.js using node v0.10.24 nvm alias default 0.10.24 Set default node version on a shell Note: to remove, delete or uninstall nvm - just remove ~/.nvm, ~/.npm and ~/.bower folders [root@ip-1-31-37-203 ~]# nvm install v6.11.0