Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm shrinkwrap extraneous module

Tags:

node.js

npm

There is the following problem - I installed all modules and I'm trying to make npm-shrinkwrap.json file:

npm shrinkwrap

But I always get the following error:

npm ERR! Darwin 14.3.0
npm ERR! argv "/usr/local/Cellar/node/4.1.2/bin/node" "/usr/local/bin/npm" "shrinkwrap"
npm ERR! node v4.1.2
npm ERR! npm  v2.10.1

npm ERR! Problems were encountered
npm ERR! Please correct and try again.
npm ERR! extraneous: [email protected] /Users/ulnda/projects/folder/node_modules/my-module/node_modules/webdriverio/node_modules/core-js
npm ERR! extraneous: [email protected] /Users/ulnda/projects/folder/node_modules/core-js
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/ulnda/projects/folder/npm-debug.log

What does it mean? How can I fix it? Thanks in advance!

like image 531
malcoauri Avatar asked Mar 14 '16 07:03

malcoauri


People also ask

How do you fix NPM err extraneous?

To resolve extraneous errors in the npm list output, you need to add the packages in your package. json file. Once the upgrade is done, run the npm list command again to see if the extraneous error is still there. Then run the npm install command to install the dependencies again.

What is extraneous NPM?

npm ERR! extraneous means a package is installed but is not listed in your project's package. json . Since you're listing packages that have been installed globally, it's going to give you a lot of extraneous errors that can be simply ignored because most things installed globally will not be in your project's package.

What is shrinkwrap in NPM?

NPM shrinkwrap is used to lock the dependency version in a project. After installing packages using npm install or npm install package-name and updating your node_modules folder, you should run npm shrinkwrap. It will create new npm-shrinkwrap.

Is shrinkwrap an NPM command?

This command repurposes package-lock. json into a publishable npm-shrinkwrap. json or simply creates a new one. The file created and updated by this command will then take precedence over any other existing or future package-lock.


1 Answers

Try npm prune before shrinkwrapping.

like image 191
Coffee Bite Avatar answered Sep 26 '22 00:09

Coffee Bite