且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在运行npm install命令时获取'npm WARN弃用'警告

更新时间:2022-10-14 20:25:00

你有一些软件包,它们使用这些插件的旧版本。



您不会摆脱这些警告,直到软件包的开发者升级他们的插件(依赖关系)。



您可以打印具有所有依赖项的所有版本以查找目标:

  bower list --depth = 2 
npm list --depth = 2

如果找不到它们,请增加深度。

I'm getting following warnings while running npm commands, how to update these dependencies ?

npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.

npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.

npm WARN deprecated npmconf@2.1.1: this package has been reintegrated into npm and is now out of date with respect to npm

My package.json -

{
  "name": "lib",
  "version": "0.0.0",
  "author": {
    "name": "user",
    "email": "user@gmail.com"
  },
  "dependencies": {
    "gulp-install": "^0.6.0",
    "lodash": "^4.5.1"
  },
  "devDependencies": {
    "chai": "^1.9.1",
    "chai-jquery": "^1.2.3",
    "karma-mocha-reporter": "^0.3.1",
    "gulp": "^3.8.7",
    "gulp-concat": "^2.3.4",
    "gulp-rename": "^1.2.0",
    "gulp-uglify": "^0.3.1",
    "karma": "^0.12.22",
    "karma-chai": "^0.1.0",
    "karma-chai-jquery": "^1.0.0",
    "karma-chrome-launcher": "^0.1.4",
    "gulp-ng-annotate": "^0.3.3",
    "karma-jasmine": "^0.1.5",
    "karma-jquery": "^0.1.0",
    "karma-mocha": "^0.1.8",
    "karma-phantomjs-launcher": "^0.1.4",
    "karma-sinon-chai": "^0.2.0",
    "mocha": "^1.21.4",
    "sinon": "^1.10.3",
    "sinon-chai": "^2.5.0"
  },
  "engines": {
    "node": ">=0.8.0"
  }
}

You have packages, which are using old versions of these plugins.

You won't get rid of these warnings, till the developers of the packages upgrading their plugins (with the dependencies).

You can print all versions with all dependencies to find the targets:

bower list --depth=2
npm list --depth=2

Increase the depth if you don't find them.