Experience `yarn start` failure in CI
See original GitHub issueDescribe the bug
CRA 3.3.0 worked great, and then all versions after it seem to fail our CircleCI builds because we use yarn start
to run e2e tests.
This is a pretty big breaking change to CI tools like CircleCI and docker-compose.
Relates to https://github.com/facebook/create-react-app/issues/8688
Did you try recovering your dependencies?
Yes and only when reverting to CRA 3.3.0 does it work again.
Using yarn version 1.16 and node 10.16
Environment
linux node10 docker container
Steps to reproduce
- Upgrade to CRA >3.3.0
- Run
yarn start
as a background test in CircleCI or any docker-linux env (works fine CRA <=3.3.0) - Fails (>3.3.0) or exits with error code 1 (as of 3.4.1)
Expected behavior
That it wouldn’t exit as a failure when it’s not a failed process
Actual behavior
background task exits as a failed process
CRA 3.3.1 does this after yarn start
:
#!/bin/bash -eo pipefail
yarn start
yarn run v1.16.0
$ yarn css
$ node-sass src/css/styles.scss src/css/styles.css
Rendering Complete, saving .css file...
Wrote CSS to /root/project/src/css/styles.css
$ tachyons src/css/styles.css > src/css/app.min.css --minify
Node#moveTo was deprecated. Use Container#append.
$ concurrently -r -k "yarn css:watch" "react-scripts start"
$ chokidar "src/css/*.scss" -c "yarn css"
Watching "src/css/*.scss" ..
ℹ 「wds」: Project is running at http://172.26.0.3/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /root/project/public
ℹ 「wds」: 404s will fallback to /index.html
Starting the development server...
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at validateString (internal/validators.js:125:11)
at Object.join (path.js:1147:7)
at noopServiceWorkerMiddleware (/root/project/node_modules/react-scripts/node_modules/react-dev-utils/noopServiceWorkerMiddleware.js:14:26)
at Layer.handle [as handle_request] (/root/project/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/root/project/node_modules/express/lib/router/index.js:317:13)
at /root/project/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/root/project/node_modules/express/lib/router/index.js:335:12)
at next (/root/project/node_modules/express/lib/router/index.js:275:10)
at launchEditorMiddleware (/root/project/node_modules/react-scripts/node_modules/react-dev-utils/errorOverlayMiddleware.js:20:7)
at Layer.handle [as handle_request] (/root/project/node_modules/express/lib/router/layer.js:95:5)
CRA 3.4.1 simply exits with no useful error message: With no error log, I might add. sucks to debug. Even SSH into container reveals nothing useful.

Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Yarn Start Command failed with exit code 1 - Stack Overflow
Go to start-menu -> search and type environment variables and open it · There will be a variable named PATH. Append C:\Windows\system32 to...
Read more >Developer experience - `yarn test` likely to fail locally
Unless they've already contributed to the project, they're unlikely to know that these tests will pass on a CI build but fail locally....
Read more >Error Codes | Yarn - Package Manager
This error means that this process failed and Yarn cannot successfully figure out which version of the package should be added to your...
Read more >Deply Failing: Yarn Build Command Not Working - Support
My build command stopped working randomly. Here's the error message. I've tried: CI=yarn build CI=yarn run build CI=true yarn run build but none...
Read more >Yarn install fails - Feedback & Bug Reports - CircleCI Discuss
The error magically disappeared without us changing the code, just retrying the same build. However, the problem with yarn not finding the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is most certainly a duplicate of #8688, at least in my environment.
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.