在运行npm install命令时获取'npm WARN弃用'警告 [英] Getting 'npm WARN deprecated' warnings while running npm install commands

查看:26850
本文介绍了在运行npm install命令时获取'npm WARN弃用'警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行npm命令时遇到以下警告,如何更新这些依赖关系?
$ b blockquote>

npm WARN不推荐使用graceful-fs@3.0 .8:graceful-fs版本3和之前的版本会在较新的节点版本上失败。请尽快更新至graceful-fs@ ^ 4.0.0。



npm WARN弃用lodash@1.0.2:lodash @< 3.0.0不再保持。升级到lodash@ ^ 4.0.0.0。



npm WARN弃用npmconf@2.1.1:此软件包已重新集成到npm中,现在已经过时了npm


我的package.json -

  {
name:lib,
version:0.0.0,
author:{
name:user,
email:user@gmail.com
},
依赖项:{
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,
业力-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
}
}


解决方案

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



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



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

  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.

这篇关于在运行npm install命令时获取'npm WARN弃用'警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆