question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Solved] TypeError — yarn start stopped working

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:9

github_iconTop GitHub Comments

3reactions
HRussellZFAC023commented, Feb 16, 2020

I also have this issue: Screenshot_2020-02-16 Error

1reaction
nealeucommented, Mar 2, 2020

I’m posting this to try to help anyone who may find themselves stuck.

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found