Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm start problem in reactjs #8639

Closed
YohannesAbera opened this issue Mar 12, 2020 · 12 comments
Closed

npm start problem in reactjs #8639

YohannesAbera opened this issue Mar 12, 2020 · 12 comments
Labels

Comments

@YohannesAbera
Copy link

pleas help me how can solve these problem?
i 「wds」: Project is running at http://10.4.91.252/
i 「wds」: webpack output is served from
i 「wds」: Content not from webpack is served from C:\Users\Enat\Desktop\React\my-app\public
i 「wds」: 404s will fallback to /
Starting the development server...

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

Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000"' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@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:
npm ERR! C:....\AppData\Roaming\npm-cache_logs\2020-03-12T11_19_38_702Z-debug.log

@sqal
Copy link

sqal commented Mar 13, 2020

@w3bdesign

Likely a problem with your source code and not a problem with npm

I don't think so. I have the exact same problem running yarn start in freshly created app

My environment:

Windows 10
node 13.9.0
yarn 1.22.0

Starting the development server...

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

Error: spawn cmd ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:467:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
    at onErrorNT (internal/child_process.js:467:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn cmd',
  path: 'cmd',
  spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000"' ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

// Edit: just wanted to add that there is no issue on node@13.9.0 on MacOS

@asadlive84
Copy link

same issue I faced

@asadlive84
Copy link

I solved the issue using this command in my terminal on Linux.

rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install
This process found this blog post https://peterthaleikis.com/posts/how-to-fix-throw-er-unhandled-error-event.html

@tweenietomatoes
Copy link

I confirm that issue with last version of NodeJS.

@sqal
Copy link

sqal commented Mar 19, 2020

Try to use Node version 12.16.1 LTS and check if that solves the issue.

That didn't help, node@12.16.1 yarn@1.22.4 and I am still having the same issue as before whether I am using yarn or npm

@sqal
Copy link

sqal commented Mar 19, 2020

I finally managed to fix it, thanks to this comment - gatsbyjs/gatsby#1767 (comment)

I don't know why but I didn't have C:\Windows\System32 added to my PATH variable.

@tweenietomatoes
Copy link

Did you installed it with chocolatey?
same issue, i previously deleted my PATHs.
I managed it with reinstalling Windows. 🗡

@IanAndy
Copy link

IanAndy commented Mar 28, 2020

#8639 (comment)

This worked for me. Thanks alot been stuck here for hours

@stale
Copy link

stale bot commented Apr 28, 2020

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.

@stale stale bot added the stale label Apr 28, 2020
@stale
Copy link

stale bot commented May 3, 2020

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.

@stale stale bot closed this as completed May 3, 2020
@rajeev1Singh
Copy link

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

Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000/"' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! awesomeapp@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the awesomeapp@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:
npm ERR! C:\Users\Rajeev Singh\AppData\Roaming\npm-cache_logs\2020-05-18T06_37_29_661Z-debug.log

@imhelal
Copy link

imhelal commented Jun 11, 2020

I have fixed by adding C:\Windows\System32 to my PATH varible.

@lock lock bot locked and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants