snippetreactCritical
'TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined'
Viewed 0 times
undefinedstringthepathtypetypeerrormusterr_invalid_arg_typereceivedargument
Problem
I'm working on a project in React and ran into a problem that has me stumped.
Whenever I run
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type
string. Received type undefined
I have no idea why this is happening.
Whenever I run
yarn start I get this error:TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type
string. Received type undefined
I have no idea why this is happening.
Solution
To fix this issue simply upgrade react-scripts package (check latest version with
Some people reported that this issue was caused by running
npm info react-scripts version):- Replace in your package.json
"react-scripts": "^3.x.x"with"react-scripts": "^3.4.1"(or the latest available version)
- (optional for some) Delete your node_modules folder
- Run
npm installoryarn install
Some people reported that this issue was caused by running
npm audit fix (avoid it!).Context
Stack Overflow Q#60234640, score: 461
Revisions (0)
No revisions yet.