Reputation: 71
Getting the following error when I run npm start in my newly created react app that I created using npx create-react-app my-app. I tried uninstalling create react app globally and then updating my node.js version to the latest available but still getting this error. Any advice on how to fix this? I'm on mac os
Thanks
internal/modules/cjs/loader.js:614
throw e;
^
Error: No valid exports main found for '/Users/quinnbarnett/Desktop/ugh/ugh/node_modules/postcss-safe-parser/node_modules/postcss'
at resolveExportsTarget (internal/modules/cjs/loader.js:611:9)
at applyExports (internal/modules/cjs/loader.js:492:14)
at resolveExports (internal/modules/cjs/loader.js:541:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:643:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:941:27)
at Function.Module._load (internal/modules/cjs/loader.js:847:27)
at Module.require (internal/modules/cjs/loader.js:1016:19)
at require (internal/modules/cjs/helpers.js:69:18)
at Object.<anonymous> (/Users/quinnbarnett/Desktop/ugh/ugh/node_modules/postcss-safe-parser/lib/safe-parse.js:1:17)
at Module._compile (internal/modules/cjs/loader.js:1121:30) {
code: 'MODULE_NOT_FOUND'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. ```
Upvotes: 1
Views: 766
Reputation: 13598
Try update to min v14.5 for your node.
Try installing [email protected] with npm i [email protected]
It looks like a bug in node.js and there's an issue open for it. https://github.com/facebook/create-react-app/issues/9273
Upvotes: 1