[Solved] TypeError — yarn start stopped working
See original GitHub issueI’m posting this to try to help anyone who may find themselves stuck.
I am on macOS 10.14.6 / Yarn 1.22.
I started experiencing an error today — I don’t know why it started happening, all I know is several attempts to clean-wipe Node/NPM/Yarn/clone from GitHub, etc. nothing worked. I kept getting this stack trace whenever I tried to run yarn start
:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:118:11)
at Object.join (path.js:1039:7)
at noopServiceWorkerMiddleware (/Users/zaydek/github/codex-app/node_modules/react-dev-utils/noopServiceWorkerMiddleware.js:14:26)
at Layer.handle [as handle_request] (/Users/zaydek/github/codex-app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/Users/zaydek/github/codex-app/node_modules/express/lib/router/index.js:317:13)
at /Users/zaydek/github/codex-app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/Users/zaydek/github/codex-app/node_modules/express/lib/router/index.js:335:12)
at next (/Users/zaydek/github/codex-app/node_modules/express/lib/router/index.js:275:10)
at launchEditorMiddleware (/Users/zaydek/github/codex-app/node_modules/react-dev-utils/errorOverlayMiddleware.js:20:7)
at Layer.handle [as handle_request] (/Users/zaydek/github/codex-app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/Users/zaydek/github/codex-app/node_modules/express/lib/router/index.js:317:13)
at /Users/zaydek/github/codex-app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/Users/zaydek/github/codex-app/node_modules/express/lib/router/index.js:335:12)
at next (/Users/zaydek/github/codex-app/node_modules/express/lib/router/index.js:275:10)
at handleWebpackInternalMiddleware (/Users/zaydek/github/codex-app/node_modules/react-dev-utils/evalSourceMapMiddleware.js:42:7)
at Layer.handle [as handle_request] (/Users/zaydek/github/codex-app/node_modules/express/lib/router/layer.js:95:5)
What ended up fixing it (at least for now) is updating to the latest CRA version e.g. yarn add --exact react-scripts@3.4.0
.
Something react scripts
was calling was breaking. Anyway, this is fixed — I hope this helps someone.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9
Top Results From Across the Web
Error: yarn start - error Command "start" not found
Specifically, yarn start is not in the scripts part of the file package.json . To solve the issue I added the following line...
Read more >Error Codes | Yarn - Package Manager
In order to solve this problem, try running yarn install again on your computer without the --immutable flag, then commit the changes if...
Read more >Troubleshooting Node.js Deploys - Heroku Dev Center
To update the yarn.lock file, run yarn install and check the changes into git. Don't check in generated directories. The app's node_modules ...
Read more >Troubleshooting - React Navigation
This section attempts to outline issues that can happen during setup and may not be related to React Navigation itself. Also see common...
Read more >Yarn start is not working in my react app
Try yarn cache clean , something's broken, most likely the cache in some way. And update yarn/npm as well, that's important, it's not...
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
I also have this issue:![Screenshot_2020-02-16 Error](https://user-images.githubusercontent.com/22746105/74606628-f78bbc00-50c9-11ea-9546-1f4d920fa77f.png)
@codex-zaydek Thank you for being so thoughtful. You certainly helped me, and I’m glad to say that it’s something I try to remember to do when I find an answer no one else seems to have done.