2

What happens when you do npm install in a dev environment on a project that has both a package.json and a npm-shrinkwrap.json file? Will it ignore the shrinkwrap and use package.json for everything or just for the dev dependencies?

Nick Dima
  • 1,587
  • 2
  • 18
  • 36

1 Answers1

0

Any files added to the production dependencies in package.json will be ignored if they are not in the npm-shrinkwrap.json. Vis-à-vis: running npm install with foo-package added to the production dependency list will not install foo-package.

Not so for devDependancies.

Running npm install with foo-package added to the devDependency list will install foo-package even if it is not found in the npm-shrinkwrap.json file.

Fun.

Node: v4.2.4

NPM: 2.14.12

f1lt3r
  • 2,176
  • 22
  • 26