Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm --only=prod installs dependencies of shrinkwrapped devDependencies #1018

Closed
jdmarshall opened this issue Mar 12, 2020 · 1 comment
Closed

Comments

@jdmarshall
Copy link

What / Why

npm install --only=prod should not be touching devDependencies, full stop.

When

all clean installs

Where

working directory

How

Current Behavior

node_modules/foo/ contains only a node_modules directory, with all of foo's dependencies

Steps to Reproduce

  • reproducible with npm 6.11.3 and npm 6.13.4
  • Publish a module 'foo' containing a shrinkwrap file.
  • Add it as a devDependency in the module under test
  • rm -rf node_modules package-lock.json npm-shrinkwrap.json && npm install --only=prod

Expected Behavior

node_modules should not contain any devDependencies

Who

  • n/a

References

  • n/a
@jdmarshall
Copy link
Author

#492 is a little vague and I can't tell if this is the same issue. It seems to present in a different manner.

@jdmarshall jdmarshall changed the title npm --only=prod installs dependencies of devDependencies npm --only=prod installs dependencies of shrinkwrapped devDependencies Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants