Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update lodash to the latest version

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

test@localhost:~# npm install jpm --global
npm WARN deprecated [email protected]: 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/npm/npm/issues/10573

Kindly suggest a solution to update the lodash version.

like image 624
OshoParth Avatar asked Dec 02 '15 05:12

OshoParth


People also ask

How do I update Lodash to latest version?

Update package to the latest major release If you'd like to update to a major release, use npm install with the tag @latest . This will install the latest version regarding of which version you already have installed. For example, if you want to install the latest version of lodash .

What is the latest version of Lodash?

lodash v4. 17.21. The Lodash library exported as Node.

How do I update npm to latest version?

Make sure to use sudo npm install -g npm if on a Mac. You can also update all outdated local packages by doing npm update without any arguments, or global packages by doing npm update -g . To update Node. js itself, I recommend you use nvm, the Node Version Manager.

How install Lodash in react?

To start using Lodash in React, you need to: Install Lodash by running npm install lodash. Import Lodash to your project by writing import _ from lodash.


2 Answers

For me , using Windows 7 worked the following:

     npm i --save lodash

Documentation on lodash can be found here:

https://lodash.com/

like image 104
Vaggelis Stefanakis Avatar answered Oct 01 '22 23:10

Vaggelis Stefanakis


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 [email protected], which is deprecated, and no longer maintained.

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

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.

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.

like image 27
Matt Way Avatar answered Oct 01 '22 23:10

Matt Way