简体   繁体   中英

How to fix Error: EEXIST: file already exists, mkdir 'C:\Users\Phantom' when create react app[CLOSE]

I'm installing react and want to create my first project on react but I'm got something problem while install it. how to fix it ?

Error: EEXIST: file already exists, mkdir 'C:\Users\Phantom'
TypeError: Cannot read property 'loaded' of undefined
    at exit (F:\nodejs\node_modules\npm\lib\utils\error-handler.js:98:27)
    at errorHandler (F:\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
    at F:\nodejs\node_modules\npm\bin\npm-cli.js:78:20
    at cb (F:\nodejs\node_modules\npm\lib\npm.js:225:22)
    at F:\nodejs\node_modules\npm\lib\npm.js:263:24
    at F:\nodejs\node_modules\npm\lib\config\core.js:83:7
    at Array.forEach (<anonymous>)
    at F:\nodejs\node_modules\npm\lib\config\core.js:82:13
    at f (F:\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
    at afterExtras (F:\nodejs\node_modules\npm\lib\config\core.js:173:20)
F:\nodejs\node_modules\npm\lib\utils\error-handler.js:98
  var doExit = npm.config.loaded ? npm.config.get('_exit') : true
                          ^

TypeError: Cannot read property 'loaded' of undefined
    at exit (F:\nodejs\node_modules\npm\lib\utils\error-handler.js:98:27)
    at process.errorHandler (F:\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
    at process.emit (events.js:197:13)
    at process._fatalException (internal/process/execution.js:123:25)
Install for create-react-app@latest failed with code 7

that's the error said

我执行了以下步骤:

  1. npm uninstall -g create-react-app
  2. npm install -g create-react-app
  3. npx create-react-app the-name-of-your-app

Is your directory in Google drive? If so, I think that's the problem. I have same problem with you, but after changing directory not related to Google Drive, it works well!

Here's where I get solution!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM