Nodejs环境安装(NPM)

NPM安装包下载: http://nodejs.cn/download/

在国内使用npm安装的会非常缓慢

npm install

建议使用淘宝的镜像仓库来替代的原有的镜像仓库(镜像仓库就是一个npm的下载源,换成国内的下载源,下载速度会提升很多)

# 在安装时候临时指定

$ npm -- registry http :// registry .cnpmjs.org info express

# 持久使用(推荐)

$ npm config set registry https: // registry.npm.taobao.org

$ npm config set registry https://registry.npmmirror.com

查看npm配置

$ npm config list
# 其他查看配置的方式
$ npm config get globalconfig
$ npm config ls -l

npm 升级到最新版

$ npm install npm -g
如果要指定版本,可以通过@指定版本
$ npm install npm@3.10.10 -g

常用命令:

npm -v

npm run serve

npm run build

npm install

npm cache clean -f

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值