npm windows install globally results in npm ERR! extraneous
1 & 2: It means you don't have the jshint listed in your project's package.json file but that it is globally installed. So it is not a big problem.
3: To avoid this extraneous error, you can run or re-run the install with the option --save
. This will update automatically you package.json file :
npm install -g jshint --save
Or need to update manually your package.json file with a "dependencies": {...}
I solved it by combining all the answers. At first I installed the package globally.
npm install -g packagename --save
Since npm installed this packaged as well globally but did not add it to my local package.json file, I had to do something about it.
I choose, the solution to remove the local one and then install it globally.
npm uninstall packagename
npm install -g packagename
This way I have no more warnings and do not mess up the package.json file.
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.json
.
I resolved this by doing an npm update
in the parent package's folder which removed some of the extraneous packages from the list and then did npm uninstall <package>
for the remaining few.
Seems to have worked, as I'm getting no errors after doing this.