Erik Ásland Erik Ásland - 3 months ago 231
Javascript Question

Node.JS: Getting error : [nodemon] Internal watch failed: watch ENOSPC

I just installed

Node.js
on my
Ubuntu 14.04
operating system for the first time. I also installed
npm
. The next step in my installation process was installing
nodemon
. This all worked out fine.




But, when I run
nodemon
by typing
nodemon app.js
in my command line, I get the following error...


[nodemon] 1.8.1
[nodemon] to restart at any time, enter
rs

[nodemon] watching: *.*
[nodemon] starting
node app.js

[nodemon] Internal watch failed: watch ENOSPC


In the command line below the error...

alopex@Alopex:~/Desktop/coding_dojo/week-9/javascript/node/testing_node$ Hello World


Why is this happening? Is this normal behavior for nodemon? If not, how can I fix it?




Side notes...

1)
app.js
is a
Javascript
file with
console.log(111)
inside of it.

2)
node
version is
v0.10.25


3)
npm
version is
1.3.10


4)
nodemon
version is
1.8.1


5)
ubuntu
version is...


Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty

Answer

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