Bruno
Bruno

Reputation: 6449

Will npm install global look in the local package.json?

Say I have "karma": "~0.12.0" in package.json, and the latest version of karma is 0.13.19. Will npm install -g karma look in the local package.json or will it install the latest version of karma available in npm?

Upvotes: 1

Views: 31

Answers (1)

Nir Levy
Nir Levy

Reputation: 12953

Once you provide npm with a package name, it will not look for in the package.json file.

If you want specific version, you can provide it in the command, not in the package.json:

npm install -g [email protected]

Upvotes: 1

Related Questions