Peter Tseng
Peter Tseng

Reputation: 13993

npm link causes "extraneous" errors

I'm using npm link to work on multiple projects that depend on each other. However, whenever I have a link in node_modules, I get a bunch of npm ERR! extraneous: <module@version> <path> messages when I do npm list. How do I make the messages go away?

Example:

cd foo_proj
npm link

cd bar_proj
npm link foo_proj

npm list

bar_proj/node_modules now contains a symlink to foo_proj, but npm list now displays a bunch of errors/warnings.

Upvotes: 3

Views: 1946

Answers (1)

mohan rathour
mohan rathour

Reputation: 430

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

you can use tree -d .. command to see the tree structure

Upvotes: 1

Related Questions