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

events.js:182 throw er; // Unhandled 'error' event #1767

Closed
OleksandrSachuk opened this issue Aug 11, 2017 · 76 comments · Fixed by #19009
Closed

events.js:182 throw er; // Unhandled 'error' event #1767

OleksandrSachuk opened this issue Aug 11, 2017 · 76 comments · Fixed by #19009
Assignees

Comments

@OleksandrSachuk
Copy link

After command, gatsby develop (npm run develop) I have got an error.
Please, help.

Your site is running at http://localhost:8000
I Your graphql debugger is running at http://localhost:8000/___graphql
events.js:182
throw er; // Unhandled 'error' event
^

Error: watch /data/home/user/Sasha/Gatsbyjs/node_modules/babel-polyfill/node_modules/core-js/library/fn/array ENOSPC
at exports._errnoException (util.js:1024:11)
at FSWatcher.start (fs.js:1382:19)
at Object.fs.watch (fs.js:1408:11)
at createFsWatchInstance (/data/home/user/Sasha/Gatsbyjs/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/data/home/user/Sasha/Gatsbyjs/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/data/home/user/Sasha/Gatsbyjs/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleDir (/data/home/user/Sasha/Gatsbyjs/node_modules/chokidar/lib/nodefs-handler.js:407:19)
at FSWatcher. (/data/home/user/Sasha/Gatsbyjs/node_modules/chokidar/lib/nodefs-handler.js:455:19)
at FSWatcher. (/data/home/user/Sasha/Gatsbyjs/node_modules/chokidar/lib/nodefs-handler.js:460:16)
at FSReqWrap.oncomplete (fs.js:153:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gatsby-starter-default@1.0.0 develop: gatsby develop
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gatsby-starter-default@1.0.0 develop 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! /data/home/user/.npm/_logs/2017-08-11T06_20_35_175Z-debug.log

@eliassotodo
Copy link

eliassotodo commented Aug 11, 2017

I am am having what seems to be the same issue. Any ideas about of what's going on here?

 DONE  Compiled successfully in 317ms                                11:09:48 PM

 I  Your site is running at http://localhost:8000
 I  Your graphql debugger is running at http://localhost:8000/___graphql
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: watch /home/username/_Code/project-dir/node_modules/find-node-modules/test/b/c/d/e/f ENOSPC
    at exports._errnoException (util.js:1020:11)
    at FSWatcher.start (fs.js:1443:19)
    at Object.fs.watch (fs.js:1470:11)
    at createFsWatchInstance (/home/username/_Code/project-dir/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/username/_Code/project-dir/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/username/_Code/project-dir/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/username/_Code/project-dir/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/home/username/_Code/project-dir/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/home/username/_Code/project-dir/node_modules/chokidar/lib/nodefs-handler.js:460:16)

NOTE:

  • I have enough space on disk
  • removing ~/.npm/tmp didn't work
  • rm -rf node_modules && npm cache clean && npm installdidn't work
  • port is not in use (netstat -nltp)

@eliassotodo
Copy link

eliassotodo commented Aug 11, 2017

the old "reboot the system" fixed it...

EDIT: I am having this issue again :/

@theangryangel
Copy link

Might want to check out jestjs/jest#3254 @Sotocodes

@kalinchernev
Copy link
Contributor

I also got error with chokidar and this error code migrating from a hugo site with nested folders in static after forestry handles assets like this.
The linux-specific command for fs worked.

@shivamlekhi
Copy link

For what it's worth, I ran npm install npm update and it works again.

@OmarJaber
Copy link

I have The same error !!

@KyleAMathews
Copy link
Contributor

Closing older issues, please open new issues if you need more help!

@hemnathmouli
Copy link

Your site is running at http://localhost:8000
Try changing your port. Like 3000 or 8080.

app.listen(3000)

My 8080 post was taken, so I got this same error

@anitahkimanthi
Copy link

i also have the issue with the

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

This happens when I try to create-react-app and also I am not able to run react app

@rahulbit
Copy link

rahulbit commented May 8, 2018

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

Error: spawn C:\Program Files\nodejs ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:217:19)
at onErrorNT (internal/child_process.js:394:16)
at process._tickCallback (internal/process/next_tick.js:174:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:223:12)
at onErrorNT (internal/child_process.js:394:16)
at process._tickCallback (internal/process/next_tick.js:174:19)
help me resolve the issue
getting this error after running ng new command

@mazux
Copy link

mazux commented May 20, 2018

Changing the port number worked for me

@ghost
Copy link

ghost commented Jun 5, 2018

image

What is this error?!

@juliancorrea
Copy link

In my MAC, I ran "killall node" and "yarn start" (or npm start) and everything is fine now.

@AliZeynalov
Copy link

@juliancorrea thanks man. executing killall node solved my problem, as well

@tallcoder
Copy link

npm install fixed it for me

@pzb568
Copy link

pzb568 commented Sep 22, 2018

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

Error: EACCES: permission denied, open '/data/data/com.termux/files/home/hexoproject/source/_posts/科学上网软件ss系列.md'
Emitted 'error' event at:
at /data/data/com.termux/files/home/hexoproject/node_modules/graceful-fs/graceful-fs.js:190:14
at /data/data/com.termux/files/home/hexoproject/node_modules/graceful-fs/graceful-fs.js:241:16
at FSReqWrap.oncomplete (fs.js:141:20)
%

@obiha
Copy link

obiha commented Sep 24, 2018

All you have to do is close all other open terminals.

Also in my case I had working through Intellij, and when ever I closed the terminal, i had to make my way back to the folder with the js file.

@henriqueslaporta
Copy link

This fix for me:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Source: Node.JS Error: ENOSPC

@kw3ku
Copy link

kw3ku commented Nov 22, 2018

if you are on node project, kindly change the port number. if it was port Listen="3004", make it port listing ="3005"

@kapomaho
Copy link

After closed the Intellij idea my problem solved.

@rmsparajuli
Copy link

image

i got this error , Please help me.

@arun-chief
Copy link

@jpbbrito
Copy link

jpbbrito commented Jan 6, 2019

@kw3ku be right, in my case used port 80 i changed to 3000 it running normally now.

@Jiunsr
Copy link

Jiunsr commented Jan 15, 2019

@kw3ku be right, in my case used port 80 i changed to 3000 it running normally now.

Right!My project port number changed to 3200 just fine. Previously number 9080.

@AkankS19
Copy link

image

i got this error , Please help me.

I am getting the same issue. Did you get any fix for this ?

@satyendrakannaujiya
Copy link

This fix for me:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Source: Node.JS Error: ENOSPC
it works for me also

@mdmasumbillah
Copy link

mdmasumbillah commented Mar 6, 2019

Run killall node
and start your app

@rahulxyz
Copy link

Due to some reason in my system variables my path was not set.
Set this to System variables:
%SystemRoot%\system32

In case it doesn't work, try killing your port already under use. (Source)
netstat -ano | findstr :yourPortNumber
taskkill /PID typeyourPIDhere /F

@muqadas12
Copy link

i am trying to install reactjs but always i got this error .one step before npm start
error

@muqadas12
Copy link

error

@akagrawat
Copy link

In my case, I resolved it by following steps

  1. Delete node module files
  2. Change in pakage.json
    "react-scripts": "3.4.1" to "react-scripts": "1.1.1"
  3. than use npm install

@muqadas12
Copy link

muqadas12 commented Mar 30, 2020 via email

@akagrawat
Copy link

@muqadas12 .... I followed react js official doc

@muqadas12
Copy link

muqadas12 commented Mar 30, 2020 via email

@muqadas12
Copy link

muqadas12 commented Mar 30, 2020 via email

@workinghuman
Copy link

I had an error like this and believe I caused it by moving the mySQL Server 8.0 folder outside of the MySQL folder into Program Files. (I originally did this because using mySQL in command line was annoying typing mySQL and then mySQL Server 8.0).
I solved it by using the mySQL installer and it worked!

@Marcelino2017
Copy link

Marcelino2017 commented Apr 3, 2020

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

Error: spawn C:\Program Files\nodejs ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:217:19)
at onErrorNT (internal/child_process.js:394:16)
at process._tickCallback (internal/process/next_tick.js:174:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:223:12)
at onErrorNT (internal/child_process.js:394:16)
at process._tickCallback (internal/process/next_tick.js:174:19)
help me resolve the issue
getting this error after running ng new command

npm install -g serve (si te sale error no importa)
despues
npm start

@SimoneNafra
Copy link

service docker restart !

@edo-edo
Copy link

edo-edo commented Apr 13, 2020

npm install react-scripts --save

@Wandersonelias
Copy link

nesse link abaixo tem uma solução que me ajudou

https://peterthaleikis.com/posts/how-to-fix-throw-er-unhandled-error-event.html

@narenkarn786
Copy link

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
This worked for me

@nijatmursali
Copy link

This fix for me:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Source: Node.JS Error: ENOSPC

I have no idea what this does, but IT WORKED!!! Thanks

@aasim782
Copy link

aasim782 commented May 30, 2020

Try to change port no : 3000 to 8080
Working fine.
**

app.listen(8080)

**

@vaibhavahuja
Copy link

All you have to do is close all other open terminals.

Also in my case I had working through Intellij, and when ever I closed the terminal, i had to make my way back to the folder with the js file.

I did exactly this and it works now. Any idea why this might be happening?

@muqadas12
Copy link

muqadas12 commented Jun 29, 2020 via email

@M-Hasnain
Copy link

M-Hasnain commented Jul 20, 2020

I am facing this problem when i was using command: browser-sync start --server --directory --files "**/*"
This error is occurring, because we are not in working directory, i changed the working directory, typed command again and it worked fine.

@muqadas12
Copy link

muqadas12 commented Jul 20, 2020 via email

@Vishal8236
Copy link

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

its work for me thanks

@Satyam62
Copy link

Satyam62 commented Aug 8, 2020

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

please solve these error earliest

@Paridhinigam
Copy link

Event.js:292
Throw er; // unhandled 'error' event
How to solve this error

@muqadas12
Copy link

muqadas12 commented Aug 24, 2020 via email

@Paridhinigam
Copy link

In my case the problem was due to path variable.i haven't set the path after setting it I didn't receive this error

On Mon, 24 Aug 2020, 8:05 PM Paridhinigam, @.***> wrote: Event.js:292 Throw er; // unhandled 'error' event How to solve this error — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1767 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONDSZJTM3KWZFQEPACIISTSCJ6THANCNFSM4DWRE5IA .

Thankyou so much.... can you help me ..how to set the path.

@muqadas12
Copy link

muqadas12 commented Aug 25, 2020 via email

@Paridhinigam
Copy link

Go to This pc then properties then Environment variable and add the path of node js there On Mon, Aug 24, 2020 at 6:58 PM Paridhinigam notifications@github.com wrote:

In my case the problem was due to path variable.i haven't set the path after setting it I didn't receive this error … <#m_2070613592314803608_> On Mon, 24 Aug 2020, 8:05 PM Paridhinigam, @.***> wrote: Event.js:292 Throw er; // unhandled 'error' event How to solve this error — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1767 (comment) <#1767 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONDSZJTM3KWZFQEPACIISTSCJ6THANCNFSM4DWRE5IA . Thankyou so much.... can you help me ..how to set the path. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1767 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONDSZN2BVYAHLNHJBV4U2TSCMLFXANCNFSM4DWRE5IA .

Thankyou

@aashishkot
Copy link

aashishkot commented Sep 13, 2020

Hi
I am facing an issue while running the yarn start and after 94% it gives an error . Any suggestions. I tried to reinstall the watchman

Snip20200914_1

@muqadas12
Copy link

muqadas12 commented Aug 15, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.