簡體   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