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

Consider disabling node_modules cache for Heroku deployment #36

Closed
glebec opened this issue Mar 6, 2017 · 1 comment
Closed

Consider disabling node_modules cache for Heroku deployment #36

glebec opened this issue Mar 6, 2017 · 1 comment

Comments

@glebec
Copy link
Contributor

glebec commented Mar 6, 2017

See heroku/heroku-buildpack-nodejs#380 for a more detailed explanation, but to summarize: Heroku's node buildpack uses yarn to install. Yarn currently has a bug wherein it doesn't do a proper integrity check as part of installation. As a result, if a devDep is changed to a dep by manually altering package.json, the deploy will mistakenly think it is still up to date, and anything relying on that dep will fail.

We can mitigate this temporarily (until yarn is fixed or the Heroku node buildpack implements a workaround) by disabling caching of the node_modules:

heroku config:set NODE_MODULES_CACHE=false

Thankfully this should still be faster than a vanilla npm install, as the yarn cache (not node_modules cache) will still be used.

I'm not sure if I want to bake this into the README at this point. I am hoping rather that the underlying issue can be fixed soon. Accordingly I'm not (yet) making a PR to change the deployment instructions.

@glebec
Copy link
Contributor Author

glebec commented Mar 17, 2017

This issue was moved to FullstackAcademy/bones#76

@glebec glebec closed this as completed Mar 17, 2017
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

1 participant