node.js npm WARN 已弃用 [email protected]:不再维护 lodash@<3.0.0

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33974189/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-02 19:35:46  来源:igfitidea点击:

npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained

node.jsgruntjsnpmlodashgrunt-cli

提问by Mastrianni

I'm getting an error when using npm to install grunt-cli globally. It's related to lodash:

使用 npm 全局安装 grunt-cli 时出现错误。它与 lodash 相关:

npm WARN deprecated [email protected]:
lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^3.0.0.


Here are the versions i'm using, and the list of global packages installed.

这是我正在使用的版本,以及已安装的全局软件包列表。

node:v5.1.0

节点:v5.1.0

npm:v3.5.0

npm:v3.5.0

npm list -g:http://pastebin.com/NuJU3bY0

npm 列表 -g:http : //pastebin.com/NuJU3bY0



I've attempted to install the latest version of lodash (v3.10.1) globally, but I still got the error again after uninstalling my grunt-cli global package, and then re-installing my global package. Below is the installation log:

我已经尝试全局安装最新版本的 lodash (v3.10.1),但是在卸载我的 grunt-cli 全局包,然后重新安装我的全局包后,我仍然再次出现错误。下面是安装日志:

sudo npm install lodash -g
/usr/local/lib
└── [email protected]

sudo npm install grunt-cli -g
npm WARN deprecated [email protected]: 
lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^3.0.0.

/usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt
/usr/local/lib
└─┬ [email protected]
  ├─┬ [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ └─┬ [email protected]
  │ │   ├── [email protected]
  │ │   └── [email protected]
  │ └── [email protected]
  ├─┬ [email protected]
  │ └── [email protected]
  └── [email protected]

npm WARN In [email protected] replacing bundled version of nopt with [email protected]
npm WARN In [email protected] replacing bundled version of findup-sync with [email protected]
npm WARN In [email protected] replacing bundled version of resolve with [email protected]
npm WARN In [email protected] replacing bundled version of lodash with [email protected]
npm WARN In [email protected] replacing bundled version of glob with [email protected]
npm WARN In [email protected] replacing bundled version of inherits with [email protected]
npm WARN In [email protected] replacing bundled version of minimatch with [email protected]
npm WARN In [email protected] replacing bundled version of sigmund with [email protected]
npm WARN In [email protected] replacing bundled version of lru-cache with [email protected]
npm WARN In [email protected] replacing bundled version of abbrev with [email protected]


Can anyone tell me what i'm doing wrong, or how to fix this error and get a clean install of grunt-cli?

谁能告诉我我做错了什么,或者如何修复此错误并全新安装 grunt-cli?

采纳答案by Tennyson H

The packagegrunt-clirelies on a older version of lodash. It shouldn't affect the functionality of grunt; it's just a warning message.

该软件包grunt-cli依赖于旧版本的 lodash。它不应该影响 grunt 的功能;这只是一个警告信息。

So, you're doing nothing wrong, it's not an error message, just a warning, and the way you've installed grunt-cli should work fine.

因此,您没有做错任何事情,这不是错误消息,只是警告,并且您安装 grunt-cli 的方式应该可以正常工作。

回答by Maverick

You can try running this command in your console:

您可以尝试在控制台中运行此命令:

npm i -g lodash

Let me know if this fixes it.

如果这能解决问题,请告诉我。