Getting 'npm WARN deprecated' warnings while running npm install commands

陌路散爱 提交于 2019-12-12 02:44:31

问题


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"
  }
}

回答1:


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.



来源:https://stackoverflow.com/questions/35569631/getting-npm-warn-deprecated-warnings-while-running-npm-install-commands

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!