*天学会 node.js (三)---命令

  • npm -v //版本号,测试是否安装成功
  • npm install <Module Name>
    npm install express -g
  • npm err! Error: connect ECONNREFUSED 127.0.0.1:8087
    解决方法: npm config set proxy null
  • npm help <command>
  • npm update <package> //更新当前目录的node_modules 目录里的对应模块
  • npm update <package> -g //更新全局安装的对应模块
  • npm cache clear // 清空npm本地缓存,用于使用相同版本号发布新版本代码的情况
  • npm cache clean // 用于清空以前安装的node_modules
  • npm install // 用于安装 node_modules
  • npm adduser // 在npm 资源库中注册用户
  • npm publish // 发布模块
  • npm unpublish <package>@<version>// 撤销自己发布过的某个版本代码

转载于:https://www.jianshu.com/p/2982d68f07f2

猜你喜欢

转载自blog.csdn.net/weixin_33827731/article/details/91184517