Is any easy way in npm
to track from which packages these kind of dependency warnings came from? Packages in the warnings is for sure not the top level ones.
I'm currently on npm v3.6.0 (node 5.6.0).
Is any easy way in npm
to track from which packages these kind of dependency warnings came from? Packages in the warnings is for sure not the top level ones.
I'm currently on npm v3.6.0 (node 5.6.0).
Running npm list
in your project directory will give you a dependency tree, and a simple text search for the deprecated packages will indicate where they came from.
As a workaround to deprecation issues, you could use npm-shrinkwrap (example usage).
I think npm explain
is what you are looking for. Below is the console result when I look-up a package named stable
in my current project. It indicates the package is installed by one of my dev dependencies named react-app-rewired
.
$ npm explain stable
[email protected]
node_modules/stable
stable@"^0.1.8" from [email protected]
node_modules/svgo
svgo@"^1.2.2" from @svgr/[email protected]
node_modules/@svgr/plugin-svgo
@svgr/plugin-svgo@"^5.5.0" from @svgr/[email protected]
node_modules/@svgr/webpack
@svgr/webpack@"5.5.0" from [email protected]
node_modules/react-scripts
react-scripts@"4.0.3" from the root project
peer react-scripts@">=2.1.3" from [email protected]
node_modules/react-app-rewired
dev react-app-rewired@"^2.1.9" from the root project
svgo@"^1.0.0" from [email protected]
node_modules/postcss-svgo
postcss-svgo@"^4.0.3" from [email protected]
node_modules/cssnano-preset-default
cssnano-preset-default@"^4.0.8" from [email protected]
node_modules/cssnano
cssnano@"^4.1.10" from [email protected]
node_modules/optimize-css-assets-webpack-plugin
optimize-css-assets-webpack-plugin@"5.0.4" from [email protected]
node_modules/react-scripts
react-scripts@"4.0.3" from the root project
peer react-scripts@">=2.1.3" from [email protected]
node_modules/react-app-rewired
dev react-app-rewired@"^2.1.9" from the root project