No Title
January 09, 2021 05:01 PM
254 words
1 minutes read
nvm
What:
nvm
as a mechanism for managing node versions
官方文档: https://github.com/nvm-sh/nvm
To switch Node.js from node@4.4.7
to node@8.9.1
i have used following command:
|
Problems:
-bash: nvm: command not found
- Before installing
nvm
, run this in terminal:touch ~/.bash_profile
- After, run this in terminal:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
- Important… - DO NOT forget to Restart your terminal OR use command
source ~/.nvm/nvm.sh
(this will refresh the available commands in your system path). - In the terminal, use command
nvm --version
and you should see the version
nvm ls 出错
在终端输入:
|
Q:不识别es6 中的 … 语法
|
A:安装 babel 转换插件
babel-transform-object-rest-spread
npm install –save-dev babel-cli babel-preset-es2015 babel-preset-es2017
|
|
资源:
https://stackoverflow.com/questions/16904658/node-version-manager-install-nvm-command-not-found