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

change env variable from YARN_CACHE to USE_YARN_CACHE #803

Merged
merged 2 commits into from
Jul 13, 2020

Conversation

danielleadams
Copy link
Contributor

@danielleadams danielleadams commented Jul 10, 2020

This was causing a bug with Yarn 2 when YARN_CACHE was set, which is a reserved env var value. This will also output USE_YARN_CACHE at the beginning of the build with the other user-configured build settings.

Blocks #795

Error from Yarn 2 logs

-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       YARN_CACHE=true
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true

-----> Installing binaries
       engines.node (package.json):  unspecified
       engines.npm (package.json):   unspecified (use default)
       engines.yarn (package.json):  unspecified (use default)

       Resolving node version 12.x...
       Downloading and installing node 12.18.2...
       Using default npm version: 6.14.5
       Resolving yarn version 1.x...
       Downloading and installing yarn (1.22.4)...
       Using yarn 2.0.0-rc.33

-----> Installing dependencies
       Using Yarn 2, skipping installations.

-----> Build
       Running build (yarn)
       Usage Error: Unrecognized or legacy configuration settings found: cache - run "yarn config -v" to see the list of settings supported in Yarn (in <environment>)

       $ yarn run [--inspect] [--inspect-brk] <scriptName> ...

@danielleadams danielleadams requested a review from a team as a code owner July 10, 2020 17:23
@danielleadams danielleadams merged commit 762cc69 into master Jul 13, 2020
@danielleadams danielleadams deleted the fix-yarn-cache-env branch July 13, 2020 15:24
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.

2 participants