I wanted to start a new React project so I went about my usual route:
npx create-react-app app-name-here
But I’ve been getting a bunch of errors. After reading several StackOverflow posts (and uninstalling and re-installing Node), I am now repeatedly getting this error:
I think this is the solution >>> https://stackoverflow.com/a/58313464/9313843 but I cannot follow it and the npm documentation was not much help either.
I know I have to find 4 files and edit…something…? But that’s all I can tell.
I’ve been trying to fix this for several hours and I think I just need help now. Can anyone break down the steps?
Error in text format in case that’s useful:
C:\Users\sabahat iqbal>npx create-react-app urdu-flash
Error: EEXIST: file already exists, mkdir 'C:\Users\sabahat'
TypeError: Cannot read property 'loaded' of undefined
at exit (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:97:27)
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:78:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:225:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:263:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7
at Array.forEach (<anonymous>)
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:171:20)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:97
var doExit = npm.config.loaded ? npm.config.get('_exit') : true
^
TypeError: Cannot read property 'loaded' of undefined
at exit (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:97:27)
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
at process.emit (events.js:311:20)
at process._fatalException (internal/process/execution.js:164:25)
Install for [ 'create-react-app@latest' ] failed with code 7