Reputation: 100426
I am installing a module globally
$ npm install -g X
and NPM says
"npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0"
how can I find out which module has an dependency on this old version of lodash?
The warning message from NPM doesn't seem to give me any clue which module references this old version (I believe that the module X does not have a direct dependency on this old version of lodash.).
Upvotes: 52
Views: 227628
Reputation: 19
For deprecated files you should use the "npm i [package]" syntax, in this case you should use: npm i X and it will fetch all necessary packages, including deprecated ones, but which are required for your installation.
Npm documentation link: https://docs.npmjs.com/using-deprecated-packages
Upvotes: 1
Reputation: 169
use this
sudo npm install --unsafe-perm -g expo-cli
Upvotes: 4
Reputation: 4553
I got an answer for the similar question: https://stackoverflow.com/a/36335866/1115187
Briefly:
npm outdated --depth=3
This command will analyze installed NPM-packages and their versions. The report will contain:
depth
level)Hope, this information could help you to gather info about outdated packages.
Next step - get in touch with maintainers of the appropriate package, and ask them to update the package (maybe, you would like to send a pull request).
There is a great npm package: npm-check
, that allows checking outdated dependencies. Probably
My favorite feature: Interactive Update — run npm-check -u
in the project folder. An interactive menu shows all required information about dependencies in the current folder and allows to update all dependencies in 3 seconds.
Upvotes: 46
Reputation: 100426
npm la <package-name>
also works, and will give you the most details about the dependency graph of a dependency.
npm ls <package-name>
, does something similar but gives you less details
Upvotes: 17
Reputation: 26920
Use npm list
. It will print out all of the packages your module depends on as well as your dependencies dependencies and so forth. Maybe redirect output to a file or grep it so you can search it more easily.
Upvotes: 4
Reputation: 34273
You could search through all the package.json files under node_modules and see which ones are dependent on lodash 1.0.2.
Upvotes: 4