一些安装包依赖一定的node版本,可以采用nvm管理node, 可以快速的进行版本切换。
操作系统: windows10, x64
常见版本工具:
- nvmw, nvmm install node 报错, 需要修改源文件代码。不推荐
- nvm-window, 采用
准备。卸载已有node。(!!!很关键)
download nvm-noinstall.zip, put in nvm file.
-
add the system environment variables.
creat %NVM_HOME% = d:\nvm creat %NVM_SYMLINK% = d:\nodejs add PATH += ;%NVM_SYMLINK%; %NVM_SYMLINK%
-
create settings.txt
root: e:\nvm path: e:\nodejs arch: 64 proxy
check: nvm -v
nvm ls
if no node, need download, or run: nvm install <version>
nvm use
check: node -v
check: npm -v
common version
v7.10.1
v8.11.3
v9.11.2
v10.4.1