如何升级我的 npm 安装?

How do I upgrade my npm installation?

我无法升级我的 npm 安装。

我尝试安装新版本 npm:

1.Step

npm install npm -g

npm install npm --save-dev

2.Step

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