如何修复错误:EEXIST:文件已经存在,mkdir 'C:\Users\Phantom' 在创建反应应用程序时[关闭] [英] How to fix Error: EEXIST: file already exists, mkdir 'C:\Users\Phantom' when create react app[CLOSE]

查看:69
本文介绍了如何修复错误:EEXIST:文件已经存在,mkdir 'C:\Users\Phantom' 在创建反应应用程序时[关闭]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在安装 react 并想在 react 上创建我的第一个项目,但在安装时遇到了一些问题.怎么解决?

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

说的是错误

推荐答案

我执行了以下步骤:

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

这篇关于如何修复错误:EEXIST:文件已经存在,mkdir 'C:\Users\Phantom' 在创建反应应用程序时[关闭]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆