create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

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

Open Satyam62 opened this issue 5 years ago • 24 comments
trafficstars

i follow

yarn global add [email protected] create-react-app confusion yarn start then got error "events.js:292 throw er; // Unhandled 'error' event" Screenshot (1083)

please sir solve these error I am facing these error many times on my laptop windows 8.1 dell

Satyam62 avatar Aug 09 '20 14:08 Satyam62

@Satyam62 Open Nodejs Command Prompt from search options and Run react-scripts start. It should work

junip avatar Aug 19 '20 10:08 junip

It is not working in my react when I run >npm run json-server then I install concurrently by running the two our more code at the same time

E:\project-you\youapp>npm run json-server

[email protected] json-server E:\project-you\youapp json-server --watch db.json --port 3001

{^_^}/ hi!

Loading db.json Done

Resources http://localhost:3001/posts http://localhost:3001/comments http://localhost:3001/profile

Home http://localhost:3001

Type s + enter at any time to create a snapshot of the database Watching...

Satyam62 avatar Aug 21 '20 03:08 Satyam62

I am facing the same problem. I followed npx create-react-app myapp cd myapp npm start

shettydikshas avatar Aug 26 '20 19:08 shettydikshas

Add path variable of your system It will be solved

sakib9286 avatar Aug 29 '20 21:08 sakib9286

Added path variable of system still facing the same issue.

shettydikshas avatar Aug 30 '20 15:08 shettydikshas

I have the same problem....

Ma-Genta avatar Sep 05 '20 01:09 Ma-Genta

Add path variable of your system It will be solved

what should we add as path variable pls write here

vkverma0210 avatar Sep 05 '20 14:09 vkverma0210

This problem is only present with [email protected], downgrading to [email protected] resolved the issue. TRY THIS

create-react-app my-app
cd my-app
npm install [email protected]
npm start

rutikwankhade avatar Sep 08 '20 14:09 rutikwankhade

i follow

yarn global add [email protected] create-react-app confusion yarn start then got error "events.js:292 throw er; // Unhandled 'error' event" Screenshot (1083)

please sir solve these error I am facing these error many times on my laptop windows 8.1 dell

I have same problem , have you fixed it?

paridhinigam10 avatar Sep 13 '20 05:09 paridhinigam10

Thanks @rutikwankhade this worked for me @paridhinigam10 try this yarn global add create-react-app create react app confusion yarn start This works for react scripts 3.0 and above

shettydikshas avatar Sep 14 '20 15:09 shettydikshas

This problem is only present with [email protected], downgrading to [email protected] resolved the issue. TRY THIS

create-react-app my-app
cd my-app
npm install [email protected]
npm start

Thanks, man! seriously I got frustrated I've tried many solutions but finally worked this for me. 👍

vishalrranjan avatar Sep 17 '20 16:09 vishalrranjan

Thanks a lot bro... i m trying last three days i gonna hopeless then i find that post finally i fixed that bug by using this post

Shubham-7518 avatar Sep 21 '20 08:09 Shubham-7518

3.1.4 react script has same problem

vishnupc1724 avatar Sep 26 '20 07:09 vishnupc1724

Thanks @rutikwankhade this worked for me @paridhinigam10 try this yarn global add create-react-app create react app confusion yarn start This works for react scripts 3.0 and above

thanks man finally my react app running

izsal avatar Nov 18 '20 23:11 izsal

If someone stumbles upon this in the search for a fix they might find this article useful: https://peterthaleikis.com/posts/how-to-fix-throw-er-unhandled-error-event That's how it got solved it for me...

spekulatius avatar Dec 12 '20 15:12 spekulatius

This problem is only present with [email protected], downgrading to [email protected] resolved the issue. TRY THIS

create-react-app my-app
cd my-app
npm install [email protected]
npm start

worked! Thanks!

adiHusky avatar Feb 27 '21 23:02 adiHusky

Hi. This is no react-related problem. I see the same error with a minimal node.js express + redis example app ! events.js:292 throw er; // Unhandled 'error' event

tvatkartje avatar Mar 26 '21 16:03 tvatkartje

I have encountered this error and I fix it with the link below: https://stackoverflow.com/a/60845088/10488304

mohammad-khoddami avatar May 08 '21 09:05 mohammad-khoddami

Anyone, please help me resolve this. I tried to fix it with the help of the above-mentioned solutions. But it didn't resolve.

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

ReferenceError: error is not defined at C:\Users\HP\Desktop\visualstudio_code\expressjs\mdata.js:41:15 at C:\Users\HP\Desktop\visualstudio_code\expressjs\node_modules\mongoose\lib\model.js:4845:18 at processTicksAndRejections (internal/process/task_queues.js:75:11) Emitted 'error' event on Function instance at: at C:\Users\HP\Desktop\visualstudio_code\expressjs\node_modules\mongoose\lib\model.js:4847:15 at processTicksAndRejections (internal/process/task_queues.js:75:11)

jeegisha341 avatar May 15 '21 07:05 jeegisha341

I solved it by changing the port(from 3000 to 3001)

Fsociety-sem avatar Jun 06 '21 07:06 Fsociety-sem

npm install will do the trick.

kgotlelelo-cmd avatar Aug 15 '21 09:08 kgotlelelo-cmd

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[bot] avatar Jan 09 '22 14:01 stale[bot]

This worked!

create-react-app my-app cd my-app npm install [email protected] npm start

joshuadgilley avatar Apr 15 '22 19:04 joshuadgilley

Adding the following environment variable to the command or the .env file also worked :

cd my-app BROWSER=none npm start

if it's Windows: set BROWSER=none&& npm start

Rimce avatar Jul 26 '24 21:07 Rimce