如何将lodash更新到最新版本

时间:2022-04-05 07:26:08

I am using npm on the debian Linux flavor to install Jpm. But am getting errors about the versions of lodash installed (as follows)

我在debian Linux风格上使用npm来安装Jpm。但是我发现安装的lodash版本有错误(如下)

test@localhost:~# npm install jpm --global
npm WARN deprecated lodash@2.4.1: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^3.0.0.

I have referred to few of the following links but am still unable to update the versions but still the issue persists.

我已经提到了以下几个链接,但我仍然无法更新版本,但仍然存在问题。

https://github.com/lodash/lodash/tree/3.10.1-npm

https://github.com/lodash/lodash/tree/3.10.1-npm

https://github.com/npm/npm/issues/10573

https://github.com/npm/npm/issues/10573

Kindly suggest a solution to update the lodash version.

请提出更新lodash版本的解决方案。

2 个解决方案

#1


6  

After re-reading the question, I realised that the error is not in fact an error at all. What you are getting is a warning, saying that jpm uses lodash@2.4.1, which is deprecated, and no longer maintained.

在重新阅读问题之后,我意识到错误实际上根本不是错误。你得到的是一个警告,说jpm使用lodash@2.4.1,这是不推荐使用的,不再维护。

After looking at the latest version of jpm, I noticed that the lodash dependency is for version 3.3.1 which should be fine.

在查看最新版本的jpm之后,我注意到lodash依赖是针对版本3.3.1的,应该没问题。

This makes me think that either the jpm version that is being installed is old, or a jpm dependency relies on an older version of lodash, which would need to be updated to remove the warning.

这让我觉得正在安装的jpm版本是旧版本,或者jpm依赖项依赖于旧版本的lodash,需要更新它以删除警告。

Either way, this warning can be ignored, but if you must get rid of it, you will need to rebuild jpm (or possibly a jpm dependency and jpm), after updating the deprecated lodash reference.

无论哪种方式,这个警告都可以忽略,但是如果你必须摆脱它,你需要在更新不推荐的lodash引用之后重建jpm(或者可能是jpm依赖和jpm)。

#2


1  

For me , using Windows 7 worked the following:

对我来说,使用Windows 7可以实现以下功能:

     npm i --save lodash

Documentation on lodash can be found here:

关于lodash的文档可以在这里找到:

https://lodash.com/

https://lodash.com/

#1


6  

After re-reading the question, I realised that the error is not in fact an error at all. What you are getting is a warning, saying that jpm uses lodash@2.4.1, which is deprecated, and no longer maintained.

在重新阅读问题之后,我意识到错误实际上根本不是错误。你得到的是一个警告,说jpm使用lodash@2.4.1,这是不推荐使用的,不再维护。

After looking at the latest version of jpm, I noticed that the lodash dependency is for version 3.3.1 which should be fine.

在查看最新版本的jpm之后,我注意到lodash依赖是针对版本3.3.1的,应该没问题。

This makes me think that either the jpm version that is being installed is old, or a jpm dependency relies on an older version of lodash, which would need to be updated to remove the warning.

这让我觉得正在安装的jpm版本是旧版本,或者jpm依赖项依赖于旧版本的lodash,需要更新它以删除警告。

Either way, this warning can be ignored, but if you must get rid of it, you will need to rebuild jpm (or possibly a jpm dependency and jpm), after updating the deprecated lodash reference.

无论哪种方式,这个警告都可以忽略,但是如果你必须摆脱它,你需要在更新不推荐的lodash引用之后重建jpm(或者可能是jpm依赖和jpm)。

#2


1  

For me , using Windows 7 worked the following:

对我来说,使用Windows 7可以实现以下功能:

     npm i --save lodash

Documentation on lodash can be found here:

关于lodash的文档可以在这里找到:

https://lodash.com/

https://lodash.com/