Created by: ro-savage
Fixes #2399 (closed)
Yarn is caching old react-scripts when running the e2e tests, which means old versions are being used during the build process. Fine for CI where each build is on a clean machine but breaks e2e in unforeseen ways on local machines.
This might be related to yarnpkg/yarn#2165
The fix is to run yarn clean cache
before running the e2e tests.
Activity
Created by: gaearon
Looks like that command doesn't work on AppVeyor. Probably https://github.com/yarnpkg/yarn/issues/2591.
Worth trying https://github.com/yarnpkg/yarn/issues/2591#issuecomment-291009255?
Created by: ro-savage
Issue is fixed in latest version of yarn, so decide best thing to do is just install the latest version of yarn. Once AppVeyor updates their yarn, the
npm install -g yarn
can be removed.AppVeyor issue: appveyor/ci/issues/1576
However, now there is a new issue related to #2030 (closed). Might be caused by using the latest version of yarn on windows machines.
Could either wait for the fix or try change this PR to use the work around gaearon mentioned.
# Workaround for https://github.com/yarnpkg/yarn/issues/2591 case "$(uname -s)" in *CYGWIN*|MSYS*|MINGW*) yarn=yarn.cmd;; *) yarn=yarn;; esac eval $yarn run build
Created by: ro-savage
Updated to apply the
yarn=yarn.cmd
fix, rather than installing the latestyarn
which causes issues else where. The latest version ofyarn
+cra
+windows 10
issue can be dealt with in #2030 (closed)Created by: gaearon
Is this hack still necessary? AppVeyor has been failing for a while now. I tried reverting this in https://github.com/facebookincubator/create-react-app/issues/2626 but it doesn't help. I'm super confused.