gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.21k stars 10.33k forks source link

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

Closed OleksandrSachuk closed 4 years ago

OleksandrSachuk commented 7 years ago

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

akagrawat commented 4 years ago

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 commented 4 years ago

Thanks.And through which tutorial you install ReactJs?

On Mon, Mar 30, 2020 at 9:58 AM Ashish Agrawat notifications@github.com wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gatsbyjs/gatsby/issues/1767#issuecomment-605782482, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONDSZMHTEQZUDRLTUBHDVLRKARINANCNFSM4DWRE5IA .

akagrawat commented 4 years ago

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

muqadas12 commented 4 years ago

OK!.Thanks a lot

On Mon, Mar 30, 2020 at 10:41 AM Ashish Agrawat notifications@github.com wrote:

@muqadas12 https://github.com/muqadas12 .... I followed react js official doc

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gatsbyjs/gatsby/issues/1767#issuecomment-605793358, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONDSZPOKKYL5XZRY34CNVDRKAWJJANCNFSM4DWRE5IA .

muqadas12 commented 4 years ago

it doesn't work .Giving same error again

On Mon, Mar 30, 2020 at 9:58 AM Ashish Agrawat notifications@github.com wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gatsbyjs/gatsby/issues/1767#issuecomment-605782482, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONDSZMHTEQZUDRLTUBHDVLRKARINANCNFSM4DWRE5IA .

workinghuman commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

service docker restart !

edo-edo commented 4 years ago

npm install react-scripts --save

Wandersonelias commented 4 years ago

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

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

narenkarn786 commented 4 years ago

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

nijatmursali commented 4 years ago

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 commented 4 years ago

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

app.listen(8080)

**

vaibhavahuja commented 4 years ago

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 commented 4 years ago

No I have no idea about this

On Mon, Jun 29, 2020 at 6:06 PM Vaibhav Ahuja notifications@github.com wrote:

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?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gatsbyjs/gatsby/issues/1767#issuecomment-651107887, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONDSZKWTLW32LLACXCASU3RZCGVDANCNFSM4DWRE5IA .

M-Hasnain commented 4 years ago

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 commented 4 years ago

OK.Thanks

On Mon, Jul 20, 2020 at 4:08 PM M-Hasnain notifications@github.com wrote:

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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gatsbyjs/gatsby/issues/1767#issuecomment-660961517, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONDSZLUXWVWXXA3R7DIQGLR4QQSPANCNFSM4DWRE5IA .

Vishal8236 commented 4 years ago

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

its work for me thanks

Satyam62 commented 4 years ago

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

please solve these error earliest

Paridhinigam commented 4 years ago

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

muqadas12 commented 4 years ago

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, notifications@github.com 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 https://github.com/gatsbyjs/gatsby/issues/1767#issuecomment-679183060, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONDSZJTM3KWZFQEPACIISTSCJ6THANCNFSM4DWRE5IA .

Paridhinigam commented 4 years ago

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 commented 4 years ago

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 … <#m2070613592314803608> 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) https://github.com/gatsbyjs/gatsby/issues/1767#issuecomment-679183060>, 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 https://github.com/gatsbyjs/gatsby/issues/1767#issuecomment-679456902, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONDSZN2BVYAHLNHJBV4U2TSCMLFXANCNFSM4DWRE5IA .

Paridhinigam commented 4 years ago

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 … <#m2070613592314803608> 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 commented 4 years ago

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 commented 3 years ago

it is due to the path issue of nodejs. You have to set path in the environmental variable carefully

On Mon, Sep 14, 2020 at 12:06 AM aashishkot @.***> wrote:

Hi I am facing an issue while running the yarn start and after 94% it gives error :

[image: Snip20200914_1] https://user-images.githubusercontent.com/22097062/93026248-411d9480-f622-11ea-8d3b-63896583c7ec.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gatsbyjs/gatsby/issues/1767#issuecomment-691711174, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONDSZNMJ7YBI7UMWTBPTADSFUJ3HANCNFSM4DWRE5IA .