Create-react-app: 'npm start' fails after create-react-app

Created on 18 Jan 2020  路  7Comments  路  Source: facebook/create-react-app

react-scripts start

Starting the development server...

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

Error: spawn cmd ENOENT
鈫怺90m at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)鈫怺39m
鈫怺90m at onErrorNT (internal/child_process.js:456:16)鈫怺39m
鈫怺90m at processTicksAndRejections (internal/process/task_queues.js:81:21)鈫怺39m
Emitted 'error' event on ChildProcess instance at:
鈫怺90m at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)鈫怺39m
鈫怺90m at onErrorNT (internal/child_process.js:456:16)鈫怺39m
鈫怺90m at processTicksAndRejections (internal/process/task_queues.js:81:21)鈫怺39m {
errno: 鈫怺32m'ENOENT'鈫怺39m,
code: 鈫怺32m'ENOENT'鈫怺39m,
syscall: 鈫怺32m'spawn cmd'鈫怺39m,
path: 鈫怺32m'cmd'鈫怺39m,
spawnargs: [ 鈫怺32m'/s'鈫怺39m, 鈫怺32m'/c'鈫怺39m, 鈫怺32m'start'鈫怺39m, 鈫怺32m'""'鈫怺39m, 鈫怺32m'/b'鈫怺39m, 鈫怺32m'"http://localhost:3000/"'鈫怺39m ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

needs triage stale

Most helpful comment

@Saheli95 , @emskaplann
I did this and it worked for me->
Add the default variables in your machines PATH:
C:Windowssystem32
C:Windows
C:WindowsSystem32Wbem

any other paths can be added to the end. Remember to have the npm paths as well:
C:Program Filesnodejs
C:Users{yourName}AppDataRoamingnpm

Hope it helps!

All 7 comments

I am getting the same error ,if anybody can answer this please help!

I'm getting same error also. OS: Windows x64

@Saheli95 , @emskaplann
I did this and it worked for me->
Add the default variables in your machines PATH:
C:Windowssystem32
C:Windows
C:WindowsSystem32Wbem

any other paths can be added to the end. Remember to have the npm paths as well:
C:Program Filesnodejs
C:Users{yourName}AppDataRoamingnpm

Hope it helps!

@Saheli95 @emskaplann If the above solution does not solve your problem, please try clearing npm cache. I was having a similar (cryptic) issue and the following solved the it

npm cache clear --force

@Saheli95 , @emskaplann
I did this and it worked for me->
Add the default variables in your machines PATH:
C:Windowssystem32
C:Windows
C:WindowsSystem32Wbem

any other paths can be added to the end. Remember to have the npm paths as well:
C:Program Filesnodejs
C:Users{yourName}AppDataRoamingnpm

Hope it helps!

Thank you @krishan93985. It worked. I don't understand how, but works

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alleroux picture alleroux  路  3Comments

DaveLindberg picture DaveLindberg  路  3Comments

wereHamster picture wereHamster  路  3Comments

ap13p picture ap13p  路  3Comments

Evan-GK picture Evan-GK  路  3Comments