-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Detect & fix yarn / npm incompatibilities #359
Comments
I would say that this Yarn issue is currently the biggest problem for production builds: yarnpkg/yarn#761 The problem is that with the production flag, yarn doesn't find deep dependencies of modules sometimes and doesn't install them, causing production builds to break consistently. Perhaps a warning around missing dependencies for production should be added to the checklist above. |
@adamreisnz done |
@hunterloftis is there a recommended way to use Thanks! |
@itaysabato you could just add it to your cached directories: |
@hunterloftis I can't seem to make caching work with yarn. Please let me know if this is a bug or something I am doing wrong. I tried setting the cache directory to
And indeed on the next build I got:
After invoking Any ideas? Thanks |
Hey @itaysabato thanks for sharing those results; I'll take a look at it this week. |
yarnpkg/yarn#761 is now solved in v0.19.1. Also dev dependencies are built when
P.s. @hunterloftis any news regarding yarn cache? :) Thanks! |
For most projects with a
yarn.lock
file, yarn is working well, but if it doesn't work, users have to either lock to an old version of the buildpack or search to discover.slugignore
to deploy their project, which is frustrating. Some simple things could make this experience smoother:node_modules
, and clearnode_modules
on any yarn project. This should mitigate some missing module issues with yarn at the moment.yarn --version
to the cache signature to clear the cache whenever yarn is added / updatedYARN_PRODUCTION
inherit fromNPM_CONFIG_PRODUCTION
unless it's explicitly set, such that yarn and npm both treatdevDependencies
equivalently again$YARN
and links to build behavior docs.$YARN
and looks for private modules, and log that they are currently unsupported by yarn.YARN_PRODUCTION=false
untilyarn install --production
doesn't install correct dependencies yarnpkg/yarn#761 is resolvedyarn list --depth=0
instead ofyarn ls
Possibly also follow this practice for npm: cache the global module cache, but clear the local
node_modules
on each build.The text was updated successfully, but these errors were encountered: