partizanos
partizanos

Reputation: 1126

npm extraneous package meaning. Usability of extraneous packages

Can a npm extraneous error mean something other than the fact that the package.json file doesn't contain it as a dependency?

Is there any use for extraneous packages? If not why npm install things without explicitly putting them into package.json?

Upvotes: 5

Views: 5427

Answers (1)

Kamafeather
Kamafeather

Reputation: 9835

Extraneous is not an actual error. As you said, it just means that the package is not explicitly defined (and, I suppose, that is not directly related to the dependency tree).

Can happen when the dependency has already been installed globally (npm install -g <package>). Or (happened to me) when using a "Github URL"-dependency to a repository that, in the same way, has another "Github URL"-dependency in its package.json.

I am not sure if that is an intended behaviour or a lack of support for nested "Github URL"-dependencies.

Upvotes: 1

Related Questions