Cannot find module react-scripts
Created by: MrMYHuang
Description
Fail to run create-react-app.cmd.
Expected behavior
create-react-app.cmd should create a react project without errors.
Actual behavior
PS D:\git> create-react-app.cmd r Creating a new React app in D:\git\r.
Installing packages. This might take a couple minutes. Installing react-scripts...
Error: Could not find or load main class add module.js:472 throw err; ^
Error: Cannot find module 'D:\git\r\node_modules\react-scripts\package.json' at Function.Module._resolveFilename (module.js:470:15) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at checkNodeVersion (C:\Users\myh\AppData\Roaming\npm\node_modules\create-react-app\index.js:225:21) at C:\Users\myh\AppData\Roaming\npm\node_modules\create-react-app\index.js:179:5 at ChildProcess. (C:\Users\myh\AppData\Roaming\npm\node_modules\create-react-app\index.js:165:5) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at ChildProcess.cp.emit (C:\Users\myh\AppData\Roaming\npm\node_modules\create-react-app\node_modules\cross-spawn\lib\enoent.js:40:29)
Environment
-
npm ls react-scripts
: D:\git -- (empty) -
node -v
: v7.4.0 -
npm -v
: 4.1.1 - Operating system: Windows 10 Enterprise 64-bit build 14393.576
- Browser and version: Firefox 50.1.0
- create-react-app: 1.0.2