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

Support for npm 5 package-lock.json #10

Merged
merged 4 commits into from
Jul 5, 2017
Merged

Support for npm 5 package-lock.json #10

merged 4 commits into from
Jul 5, 2017

Conversation

mars
Copy link
Owner

@mars mars commented Jul 2, 2017

npm 5 dramatically changes npm install behavior by using a deterministic lock file. Unfortunately, this causes the modules installed by npm install --only=dev to be erased before the build. So, create-react-app's build process stops working!

This changeset revises the order of installation to dependencies first, then devDependencies, and it forces npm to ignore the lock file (using the --no-shrinkwrap flag) for devDependencies.

It comes at the price of, when package-lock.json is present, removing & reinstalling all devDependencies on each deploy.

Another solution is to manually move react-scripts (& other devDeps required for build) to the productiondependencies in package.json.

@mars mars merged commit 80bbce5 into master Jul 5, 2017
Repository owner deleted a comment from patotoma Jun 11, 2018
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

Successfully merging this pull request may close these issues.

1 participant