繁体   English   中英

如何升级npm安装?

[英]How do I upgrade my npm installation?

我一直无法升级我的npm安装。

我尝试安装新版本的npm

1.步骤

npm install npm -g

npm install npm --save-dev

2.步骤

npm outdated 

Package  Current  Wanted  Latest
npm        3.5.3   3.5.4   3.5.3

package.json

{
  "name": "tiko",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
  }
}

npm update

npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\npm\node_modules\init-pa
ckage-json with new installed version
npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\npm\node_modules\npm-ins
tall-checks with new installed version
npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\npm\node_modules\node-gy
p with new installed version
npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\npm\node_modules\npmlog
with new installed version
npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\npm\node_modules\read-pa
ckage-json with new installed version

npm outdated 

Package  Current  Wanted  Latest  Location
npm        3.5.4   3.5.4   3.5.3  tiko

npm更新不起作用吗?

您可以使用npm本身更新npm安装。

您需要将npm的最新版本安装为全局软件包:

$ npm install npm -g

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM