我正在安装 react 并想在 react 上创建我的第一个项目,但在安装它时遇到了一些问题。 如何解决?
Error: EEXIST: file already exists, mkdir 'C:UsersPhantom'
TypeError: Cannot read property 'loaded' of undefined
at exit (F:nodejsnode_modulesnpmlibutilserror-handler.js:98:27)
at errorHandler (F:nodejsnode_modulesnpmlibutilserror-handler.js:216:3)
at F:nodejsnode_modulesnpmbinnpm-cli.js:78:20
at cb (F:nodejsnode_modulesnpmlibnpm.js:225:22)
at F:nodejsnode_modulesnpmlibnpm.js:263:24
at F:nodejsnode_modulesnpmlibconfigcore.js:83:7
at Array.forEach (<anonymous>)
at F:nodejsnode_modulesnpmlibconfigcore.js:82:13
at f (F:nodejsnode_modulesnpmnode_modulesonceonce.js:25:25)
at afterExtras (F:nodejsnode_modulesnpmlibconfigcore.js:173:20)
F:nodejsnode_modulesnpmlibutilserror-handler.js:98
var doExit = npm.config.loaded ? npm.config.get('_exit') : true
^
TypeError: Cannot read property 'loaded' of undefined
at exit (F:nodejsnode_modulesnpmlibutilserror-handler.js:98:27)
at process.errorHandler (F:nodejsnode_modulesnpmlibutilserror-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
这就是说的错误
我执行了以下步骤:
-
npm uninstall -g create-react-app
-
npm install -g create-react-app
-
npx create-react-app the-name-of-your-app