使用create-react-app创建新的React应用|找不到模块node_modules \ react-scripts \ package.json

时间:2018-06-29 14:38:40

标签: javascript reactjs create-react-app

我在npm中全局安装了create-react-app。

当我尝试使用命令create-react-app cdc-admin创建新应用时,它会在Git Bash中返回:

Creating a new React app in C:\Program Files\VertrigoServ\www\estudo\React\app-teste\cdc-admin.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...


Aborting installation.
Unexpected error. Please report it as a bug:
{ Error: Cannot find module 'C:\Program Files\VertrigoServ\www\estudo\React\app-teste\cdc-admin\node_modules\react-scripts\package.json'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at checkNodeVersion (C:\Program Files\nodejs\node_modules\create-react-app\createReactApp.js:514:23)
    at getPackageName.then.then.then.packageName (C:\Program Files\nodejs\node_modules\create-react-app\createReactApp.js:312:7)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7) code: 'MODULE_NOT_FOUND' }

Deleting generated file... package.json
Deleting cdc-admin / from C:\Program Files\VertrigoServ\www\estudo\React\app-teste
Done.

我到处都是,但找不到解决方法。

0 个答案:

没有答案