npm命令

1、更新全局的某个版本

npm update -g 版本

2、react-native的版本

react-native --version

3、卸载模块

npm uninstall

4、更新模块

npm update

5、搜索模块

npm searc

6、查看当前包的安装路径

npm root

7、查看全局的包的安装路径

npm root -g

8、检查包是否已经过时,此命令会列出所有已经过时的包,可以及时进行包的更新

npm outdated
9、 查看安装的模块

npm list

10、安装nodejs的依赖包

npm install  

11、在项目中引导创建一个package.json文件

npm init

12、管理npm的配置路径

npm config

  设置代理
     npm config set proxy=http://dev-proxy.oa.com:8080
     设置淘宝镜像
     npm config set registry https://registry.npm.taobao.org
     临时配置淘宝镜像
     npm install -g cnpm --registry=https://registry.npm.taobao.org
     删除代理
     npm config delete proxy
     删除镜像
     npm config delete registry
13、 启动模块

npm start

14、停止模块

npm stop

15、 重新启动模块

npm restart

16、 测试模块

npm test

17、 用户登录

npm adduser

18、 发布模块

npm publish

19、在发布的包上设置访问级别

npm access

转载于:https://my.oschina.net/u/3939041/blog/2251962

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值