1

I have problems with creating react apps with create-react-app. Whenever I try to create one and actually run it with npm start I get this error

events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: spawn cmd ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

And in the logs it says this:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Jonathan\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using npm@6.11.2
3 info using node@v10.16.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle test@0.1.0~prestart: test@0.1.0
6 info lifecycle test@0.1.0~start: test@0.1.0
7 verbose lifecycle test@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle test@0.1.0~start: PATH: C:\Users\Jonathan\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Jonathan\Documents\test\node_modules\.bin;D:\Program Files (x86)\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\Java\jdk1.8.0_152\bin;C:\Users\Jonathan\AppData\Local\Programs\Python\Python35;C:\Users\Jonathan\AppData\Local\atom\bin;D:\Users\Jonathan\AppData\Local\Programs\Fiddler;C:\Users\Jonathan\AppData\Roaming\npm
9 verbose lifecycle test@0.1.0~start: CWD: C:\Users\Jonathan\Documents\test
10 silly lifecycle test@0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle test@0.1.0~start: Returned: code: 1  signal: null
12 info lifecycle test@0.1.0~start: Failed to exec start script
13 verbose stack Error: test@0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\Jonathan\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\Jonathan\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid test@0.1.0
15 verbose cwd C:\Users\Jonathan\Documents\test
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Jonathan\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v10.16.0
19 verbose npm  v6.11.2
20 error code ELIFECYCLE
21 error errno 1
22 error test@0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the test@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

I have tried everything I could based on what I found on the internet, without success...

Note: I am pretty sure the problem has to do with react-scripts which I have not installed globally. And I am on Windows 10

Thank you for your help

0 Answers0