Open mohammad-qb opened 5 years ago
Hi, i confirm that i have the same problem , since yesterday
Finally i downgrade my react-scripts in package.json to this version : "react-scripts": "^2.1.8" and it works for me
Hi, I have the same problem , since morning
When I am trying to create new app using create-react-app and trying to start it thorwing below error. Though old apps are still running. Please help me in this as I have already tried all solutions available on stackoverflow and issue list.
OS: WIN 8, NODE : v10.15.3 NPM: 6.4.1
create-react-app
react@16.8.6 react-scripts@3.0.1 react-dom@16.8.6
React npm start throwing the error and not opening the localhost:3000
Error On Cmd:
my-app@0.1.0 start C:\UI Dev\React-Demo\my-app react-scripts start
Starting the development server...
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! 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 log ging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\MyPC\AppData\Roaming\npm-cache_logs\2019-05-16T0807 48_884Z-debug.log
to work around the problem i use this old version of react-scripts :
react-scripts@2.1.8
Here is the message I get in my terminal, it seems to be something to do with the version of babel-jest in the react-scripts 3.0.1 package:
The react-scripts package provided by Create React App requires a dependency: "babel-jest": "^24.8.0" However, a different version of babel-jest was detected higher up in the tree: npm ls babel-jest state-app@0.1.0 └─┬ react-scripts@3.0.1 ├── babel-jest@24.8.0 └─┬ jest@24.7.1 └─┬ jest-cli@24.8.0 └─┬ jest-config@24.8.0 └── babel-jest@24.8.0 deduped
Once I rolled back to react-scripts 3.0.0 npm start works fine.
Was helping someone with this problem on their Windows box and came across the following SO article and it did the trick.
I checked system variables one more time and found the cause of the problem: missing
C:\Windows\System32\
variable. I added it and that solved my problem
More detailed instructions that didn't get labeled as the answer:
Goto > Control Panel\System and Security\System\Advance system setting\Enviroment variable and set system variables path
C:\Windows\System32\
variable and restart your System.
Took a fair amount of Googling to arrive there. Hopefully this helps people out so they aren't forced to try a particular, now outdated, version of react-scripts
just to get their React app running.
i have some problem too, check yours environtment variable first, this is mine and its work
Finally i downgrade my react-scripts in package.json to this version : "react-scripts": "^2.1.8" and it works for me
This worked for me also. Pretty weird, though.
Finally i downgrade my react-scripts in package.json to this version : "react-scripts": "^2.1.8" and it works for me
This worked for me also. Pretty weird, though.
So, does that mean the latest version of React (v3.2) is not usable ??
Finally i downgrade my react-scripts in package.json to this version : "react-scripts": "^2.1.8" and it works for me
This worked for me also. Pretty weird, though.
works for me thanks
Yup, downgrading works~!
instead of npx, use npm i create-react-app.
Downgrading works (y)
Yep!! Downgrading works for me
How did you downgrade it, do you have any links or any video available ? Please send me. Thanks in advance for the solutions.
How did you downgrade it, do you have any links or any video available ? Please send me. Thanks in advance for the solutions.
First, go to the package.json file then find out the "react-scripts" tag and make it like this "react-scripts": "^2.1.8" after that remove the node modules folder and again install node modules using npm install. I think these steps will help you.
what hapen?/ please help me
Starting the development server...
events.js:187 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:80: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:80: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! react-js@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-js@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\Amir Mousavi\AppData\Roaming\npm-cache_logs\2019-12-18T08_49_45_731Z-debug.log
Finally i downgrade my react-scripts in package.json to this version : "react-scripts": "^2.1.8" and it works for me
thank my project is worked good job
You could downgrade with help of this scrip and writing that on your terminal then everything should be work:
create-react-app my-app cd my-app npm install react-scripts@2.1.8 npm start
You could downgrade with help of this scrip and writing that on your terminal then everything should be work:
create-react-app my-app cd my-app npm install react-scripts@2.1.8 npm start
Thanks, this worked. I legit got tired of trying all the different methods mentioned across github issues and stack overflow through npm and yarn multiple times, in the end this worked.
app@0.1.0 start C:\Users\mohammad ahmad\Desktop\React Projects\app react-scripts start
Starting the development server...
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! app@0.1.0 start:
react-scripts start
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the 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:\Users\mohammad ahmad\AppData\Roaming\npm-cache_logs\2019-05-15T20_48_25_193Z-debug.log
its working fine for me when i changed the react-scripts version: "3.4.1" to "react-scripts": "2.1.8" in package.json .
I checked system variables one more time and found the cause of the problem: missing C:\Windows\System32\ variable. I added it and that solved my problem
This is working and seems a better solution than the workaround of downgrading react-scripts version. Thanks @creativetim
Was helping someone with this problem on their Windows box and came across the following SO article and it did the trick.
I checked system variables one more time and found the cause of the problem: missing
C:\Windows\System32\
variable. I added it and that solved my problemMore detailed instructions that didn't get labeled as the answer:
Goto > Control Panel\System and Security\System\Advance system setting\Enviroment variable and set system variables path
C:\Windows\System32\
variable and restart your System.Took a fair amount of Googling to arrive there. Hopefully this helps people out so they aren't forced to try a particular, now outdated, version of
react-scripts
just to get their React app running.
Tried this, this also works. better than downgrading. Thanks a lot!
Firstly type rm node_modules, once the node modules is been deleted, type npm install and then yarn --build, restart the IDE. the run the npm start command it will work.
Firstly type rm node_modules, once the node modules is been deleted, type npm install and then yarn --build, restart the IDE. the run the npm start command it will work.
this works for me
I had the same problem. Adding C\Windows\ System32 to the system path variable worked for me.
I had the same problem. Adding C\Windows\ System32 to the system path variable worked for me.
it works thanks bro
non of the above doesn't work for me, any other way to solve this problem ???
E:\Web development\intern-gate\react-test>yarn start yarn run v1.22.4 $ react-scripts start Starting the development server...
events.js:292 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"' ]
} error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
E:\Web development\intern-gate\react-test>cd ..events.js:292 The system cannot find the path specified.
E:\Web development\intern-gate\react-test> throw er; // Unhandled 'error' event
i tried all above steps but still no answer solved my problem
You could downgrade with help of this scrip and writing that on your terminal then everything should be work:
create-react-app my-app cd my-app npm install react-scripts@2.1.8 npm start
thanks alot kind stranger... i literally fcuked myself on figuring out the problem
Did anyone figure out what's the issue. Was facing the same issue and only fixed it by downgrading react. Question is why
You could downgrade with help of this scrip and writing that on your terminal then everything should be work:
create-react-app my-app cd my-app npm install react-scripts@2.1.8 npm start
thanks bro it works.
To solve this issue , insert the following path in your system and user variables.
C:\Windows\System32\WindowsPowerShell\v1.0
Set this path in both User and system variables. Next, open Nodejs command prompt or terminal and type npm start
I hope this solution will work !
Help me the error is
learn-three@1.0.0 start D:\My Work\Learning\three webpack-dev-server --mode development --open
i 「wds」: Project is running at http://localhost:8080/ i 「wds」: webpack output is served from / i 「wds」: Content not from webpack is served from ./dist events.js:292 throw er; // Unhandled 'error' event ^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:8080/' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! learn-three@1.0.0 start: webpack-dev-server --mode development --open
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the learn-three@1.0.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\Adit Karki\AppData\Roaming\npm-cache_logs\2020-10-28T06_57_13_281Z-debug.log The terminal process "C:\Windows\system32\cmd.exe /d /c npm run start" terminated with exit code: 1.
To solve this issue , insert the following path in your system and user variables.
C:\Windows\System32\WindowsPowerShell\v1.0
Set this path in both User and system variables. Next, open Nodejs command prompt or terminal and type npm start
I had the same issue,I had to downgrade scripts version to 2.1.8.
Solution:
I have to use sudo npm start
for scripts version > 2.1.8,it works for me every time.
Though I'm still trying to figure out why do I have to use sudo
everytime for running npm start
for scripts version > 2.1.8,can anyone tell me?
in my case, error happen when react-app try to open browser when server running. the system block it. so i disabled auto-open browser by put .env file in root folder, with BROWSER=none inside it....
another solution to try: install xdg-utils in your system. if your server running at ubuntu, try sudo apt-get install -y xdg-utils
Starting the development server...
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! app@0.1.0 start:
react-scripts start
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the 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:\Users\mohammad ahmad\AppData\Roaming\npm-cache_logs\2019-05-15T20_48_25_193Z-debug.log