NodeJS - Kuangcp/Note GitHub Wiki
目录 start
目录 end|2020-06-24 02:06|
- 官网下载
- 进入解压的
bin/node 和 npm
建立软链接到/usr/local/bin/
目录下 - 执行 node --version 和 npm -v 查看是否配置成功
- 添加node的真正解压目录到环境变量中, 之后安装的模块才能被找到
NODE_HOME=/home/kcp/Application/sdk/node-v8.11.1-linux-x64
export PATH=$PATH:$NODE_HOME/bin
镜像地址
还包括各种常用软件
- 临时使用
npm --registry https://registry.npm.taobao.org install express
- 永久使用
npm config set registry https://registry.npm.taobao.org
- 通过cnpm使用
npm install -g cnpm --registry=https://registry.npm.taobao.org
emmm, 为什么我就配置不成功
查看配置是否成功:
npm config get registry
npm install -g vue-cli --registry=https://registry.npm.taobao.org