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

[nodemon] Internal watch failed: watch ENOSPC #907

Closed
StCremer opened this issue Sep 14, 2016 · 34 comments
Closed

[nodemon] Internal watch failed: watch ENOSPC #907

StCremer opened this issue Sep 14, 2016 · 34 comments

Comments

@StCremer
Copy link

After restarting Nodemon with the same file got this Error.
Os: CentOs 7
[nodemon] 1.10.2
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node telefumSearcher.js
[nodemon] Internal watch failed: watch /home/st.cremer/Сайты/telefumsearcher ENOSPC

@cnadeau
Copy link

cnadeau commented Sep 22, 2016

Had the same problem with node 0.10.46

I found out that this problem started in nodemon 1.4.2, 1.4.1 works fine for us

@showzyl
Copy link

showzyl commented Oct 18, 2016

[nodemon] 1.11.0
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node index.js
...
[nodemon] Internal watch failed: watch ENOSPC

@remy
Copy link
Owner

remy commented Oct 18, 2016

Googling ENOSPC refers to disk space and a lack thereof. Could be a temp drive, could be something else, but that error is coming from node.

@remy remy closed this as completed Oct 18, 2016
@phuongleduy
Copy link

you can use ps -ef | grep node to find the process id

and then sudo kill -9

@francistito
Copy link

francistito commented Jan 25, 2018

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

@keshrirai
Copy link

This is not working nodemon ....why.. ?????
[nodemon] 1.17.3
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node app.js
[nodemon] Internal watch failed: watch /media/keshri/Documents/Express/project ENOSPC

@francistito
Copy link

@keshrirai have you tried this? its works for me.
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

@lenikhilsingh
Copy link

@dontito94 , thanks a lot man. It worked. I'm curious to know more about it. Can you please explain the function of that command?

@madanpandey97
Copy link

@ dontito94 what function you have used, please explain

@francistito
Copy link

francistito commented May 26, 2018

@madanpandey97 echo fs.inotify.max_user_watches=524288 it increase the number of watches of nodemon as you made some changes in your project and sudo tee -a /etc/sysctl.conf && sudo sysctl -p is sysctl command for configure kernel parameters at runtime @lenikhilsingh

@abejide001
Copy link

@dontito94 worked for me, thanks.

@francistito
Copy link

you welcome @abejide001

@chan1di
Copy link

chan1di commented Jun 7, 2018

thanks @dontito94 t worked for me too ;)

@francistito
Copy link

thanks bro @chan1di

@OrionStark
Copy link

@dontito94 Thanks dude hahahaha...

@francistito
Copy link

yeah man @OrionStark

@Zircoz
Copy link

Zircoz commented Jul 9, 2018

Thanks man @dontito94

@simba999
Copy link

It works for me. Thanks, @dontito94.
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

@austin047
Copy link

Works for me, thanks Man.

@cantdocpp
Copy link

thank you @dontito94 you've saved me

@gifteddiz
Copy link

Magic =) thank you @dontito94

@depkchowdary
Copy link

worked for me. Thank you

@ccolemanimsglobalorg
Copy link

Thanks

@yacineMTB
Copy link

This is probably because we are killing the proc in a way that doesn't make it stop watching the folder. There's probably a more graceful way of dealing with it than simply adding the allowed watchers.. that limit is set for a reason

@nerkn
Copy link

nerkn commented Oct 10, 2018

This is probably because we are killing the proc in a way that doesn't make it stop watching the folder. There's probably a more graceful way of dealing with it than simply adding the allowed watchers.. that limit is set for a reason

@yacineMTB I just restarted computer

@emrekulahli
Copy link

thanks @dontito94 it works.

@tbhaxor
Copy link

tbhaxor commented Jan 25, 2019

@keshrirai have you tried this? its works for me.
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Why do i always have to execute this command before nodemon ?

@francistito
Copy link

@tbhaxor it increase the number of watches of nodemon as you made some changes in your project and configure kernel parameters at runtime

@tbhaxor
Copy link

tbhaxor commented Jan 25, 2019

@tbhaxor it increase the number of watches of nodemon as you made some changes in your project and configure kernel parameters at runtime

Maybe thats why because originally /etc/sysctl.conf doesnt exists in my OS
Btw: my os is Arch Linux 4.19-Manjaro

@francistito
Copy link

@tbhaxor it increase the number of watches of nodemon as you made some changes in your project and configure kernel parameters at runtime

Maybe thats why because originally /etc/sysctl.conf doesnt exists in my OS
Btw: my os is Arch Linux 4.19-Manjaro

Yeah sure! so just do execute at a time before nodemon

@shashanksaxena
Copy link

@dontito94 Great thanks !

@Ankitacse
Copy link

step1)
sudo npm install mongodb@latest

step2)
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen

step3)
sudo apt-get update

step4)
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse

step5)
sudo apt-get install MongoDB

step6)
nodemon serve

hopefully, it solved the same error I am facing while working on Angular8 with Nodejs and using MongoDB as a database.

for fetching above steps I follow the following links:-
1)https://docs.mongodb.com/v3.0/tutorial/install-mongodb-on-debian/
2)https://stackoverflow.com/questions/28945921/e-unable-to-locate-package-mongodb-org.
3)https://stackoverflow.com/questions/34733340/mongodb-gpg-invalid-signatures
that's all .. :)

@demonta1111
Copy link

It appears that my max ports weren’t configured correctly. I ran the following code and it worked…

echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
What this command does is to increase the number of watches allowed for a single user. By the default the number can be low (8192 for example). When nodemon tries to watch large numbers of directories for changes it has to create several watches, which can surpass that limit.

You could also solve this problem by:

sudo sysctl fs.inotify.max_user_watches=582222 && sudo sysctl -p

If Still Not Working Please Look For this Solution Icetutor

@dezentechorg
Copy link

@dontito94 Great, Worked for me. thanks !

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

No branches or pull requests