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











up vote
75
down vote

favorite
29












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









share|improve this question






















  • Possible duplicate of Grunt watch error - Waiting...Fatal error: watch ENOSPC
    – Andre Figueiredo
    Feb 2 '17 at 14:39















up vote
75
down vote

favorite
29












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









share|improve this question






















  • Possible duplicate of Grunt watch error - Waiting...Fatal error: watch ENOSPC
    – Andre Figueiredo
    Feb 2 '17 at 14:39













up vote
75
down vote

favorite
29









up vote
75
down vote

favorite
29






29





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









share|improve this question













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






javascript node.js






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 7 '16 at 18:31









Erik Åsland

3,78931738




3,78931738












  • Possible duplicate of Grunt watch error - Waiting...Fatal error: watch ENOSPC
    – Andre Figueiredo
    Feb 2 '17 at 14:39


















  • Possible duplicate of Grunt watch error - Waiting...Fatal error: watch ENOSPC
    – Andre Figueiredo
    Feb 2 '17 at 14:39
















Possible duplicate of Grunt watch error - Waiting...Fatal error: watch ENOSPC
– Andre Figueiredo
Feb 2 '17 at 14:39




Possible duplicate of Grunt watch error - Waiting...Fatal error: watch ENOSPC
– Andre Figueiredo
Feb 2 '17 at 14:39












10 Answers
10






active

oldest

votes

















up vote
255
down vote



accepted










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


But the way it was written first will make this change permanent.






share|improve this answer



















  • 5




    Could someone explain a little more what this does and elaborate on why it could help?
    – Hinrich
    Apr 30 '16 at 7:29






  • 10




    @Hinrich, it is just a guess, i think nodejs watches the file system changes via inotify library. I think there is a limit per user for the max number of watches, which this setting changes to a greater value.
    – ᐅdevrimbaris
    May 6 '16 at 7:27






  • 2




    @devrimbaris Correct!
    – Erik Åsland
    May 19 '16 at 22:17






  • 3




    It has just happened to me after going from Ubuntu 14.04 to Ubuntu 16.04. Your solution worked for me as well. Thank you
    – Mestre San
    Jul 26 '16 at 19:45








  • 2




    Please add some description about the command above ?
    – Aditya Kresna Permana
    Jul 25 '17 at 9:14


















up vote
13
down vote













As per discussion over here, ENOSPC means Error No more hard-disk space available. Reason why this much memory required by nodemon or gulp-nodemon (in my case) is that it was watching contents of a folder which it shouldn't. To fix that nodemon has ignore setting that can be used to tell nodemon what not to watch. Have a look at nodemon sample config here.






share|improve this answer





















  • Good job, this is the root cause.
    – lutaoact
    Feb 22 at 13:24


















up vote
13
down vote













[nodemon] Internal watch failed: watch /home/Document/nmmExpressServer/bin ENOSPC
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nmmexpressserver@0.0.0 start: `nodemon ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nmmexpressserver@0.0.0 start script.


This is the error I got when running nodemon ./bin/www.




The solution was closing an Atom window that had a entire directory of folders open in the project window.




I don't know why, but I'm assuming Atom and nodemon use similar processes to watch files/folders.






share|improve this answer



















  • 1




    That was exactly my problem. I happeed to launch atom from the project's install directory. I closed atom, launched it from a different dir and the problem went away.
    – Ya.
    Jul 22 at 19:16












  • In my case, the same was happening on Sublime in Ubuntu. When I closed the IDE, I could run it properly. Any tips about it?
    – Shad
    Sep 20 at 19:42










  • I've not tried to replicate it to see if it has been fixed.
    – alucinare
    Sep 21 at 23:30










  • Thanks. Mine can work after I close Gitkraken. This is a strange problem. So that means we can not have two processes monitoring the same folder?
    – Zhang LongQI
    Nov 9 at 9:21












  • It was Nextcloud client here - that uses a ton of inotify watches. Thanks, y'all!
    – Bill McGonigle
    Nov 23 at 0:49


















up vote
5
down vote













Erik,
You can just kill all the other node processes by




pkill -f node




and then restart your server again. It'll work just fine then.






share|improve this answer




























    up vote
    5
    down vote













    It works for me.



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





    share|improve this answer






























      up vote
      4
      down vote













      Add a nodemon.json configuration file in your root folder and specify ignore patterns for example:



      nodemon.json



      {
      "ignore": [
      "*.test.js",
      "dist/*"
      ]
      }



      • Note that by default .git, node_modules, bower_components, .nyc_output, coverage and .sass-cache are ignored so you don't need to add them to your configuration.


      Explanation: This error happens because you exceeded the max number of watchers allowed by your system (i.e. nodemon has no more disk space to watch all the files - which probably means you are watching not important files). So you ignore non-important files that you don't care about changes in them for example the build output or the test cases.






      share|improve this answer






























        up vote
        4
        down vote













        On running node server shows Following Errors and solutions:



        nodemon server.js




        [nodemon] 1.17.2



        [nodemon] to restart at any time, enter rs



        [nodemon] watching: .



        [nodemon] starting node server.js




        [nodemon] Internal watch failed: watch /home/aurum304/jin ENOSPC



        sudo pkill -f node


        or



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





        share|improve this answer






























          up vote
          0
          down vote













          I had the same error, but in Ubuntu 14.04 inside Windows 10 (Bash on Ubuntu on Windows). All I did to overcome the error was to update the Creators update, which then allowed me to install 16.04 version of Ubuntu bash and then after installing newest version of node (by this steps) I installed also the newest version of npm and then the nodemon started to work properly.






          share|improve this answer




























            up vote
            0
            down vote













            Instead of specifying a list of directories to ignore (e.g. negative), you can also specify a list of directories to watch (e.g positive):



            nodemon --watch dir1 --watch dir2  dir1/examples/index.js


            In my particular case, I had one directory I wanted to watch and about nine I wanted to ignore, so specifying '--watch' was much simpler than specifying '--ignore'






            share|improve this answer




























              up vote
              0
              down vote













              After running nodemon ,I got following error



              [nodemon] 1.18.6
              [0] [nodemon] to restart at any time, enter
              rs
              [0] [nodemon] watching: *.*
              [0] [nodemon] starting
              node server.js
              [0] [nodemon] Internal watch failed: ENOSPC: no space left on device, watch 'some filename'
              [0] npm ERR! code ELIFECYCLE
              [0] npm ERR! errno 1
              [0] npm ERR! mernapp@1.0.0 server:
              nodemon server.js
              [0] npm ERR! Exit status 1
              [0] npm ERR!
              [0] npm ERR! Failed at the mernapp@1.0.0 server script.



              But these were resolved after running this command:



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





              share|improve this answer





















                Your Answer






                StackExchange.ifUsing("editor", function () {
                StackExchange.using("externalEditor", function () {
                StackExchange.using("snippets", function () {
                StackExchange.snippets.init();
                });
                });
                }, "code-snippets");

                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "1"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f34662574%2fnode-js-getting-error-nodemon-internal-watch-failed-watch-enospc%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                10 Answers
                10






                active

                oldest

                votes








                10 Answers
                10






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                255
                down vote



                accepted










                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


                But the way it was written first will make this change permanent.






                share|improve this answer



















                • 5




                  Could someone explain a little more what this does and elaborate on why it could help?
                  – Hinrich
                  Apr 30 '16 at 7:29






                • 10




                  @Hinrich, it is just a guess, i think nodejs watches the file system changes via inotify library. I think there is a limit per user for the max number of watches, which this setting changes to a greater value.
                  – ᐅdevrimbaris
                  May 6 '16 at 7:27






                • 2




                  @devrimbaris Correct!
                  – Erik Åsland
                  May 19 '16 at 22:17






                • 3




                  It has just happened to me after going from Ubuntu 14.04 to Ubuntu 16.04. Your solution worked for me as well. Thank you
                  – Mestre San
                  Jul 26 '16 at 19:45








                • 2




                  Please add some description about the command above ?
                  – Aditya Kresna Permana
                  Jul 25 '17 at 9:14















                up vote
                255
                down vote



                accepted










                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


                But the way it was written first will make this change permanent.






                share|improve this answer



















                • 5




                  Could someone explain a little more what this does and elaborate on why it could help?
                  – Hinrich
                  Apr 30 '16 at 7:29






                • 10




                  @Hinrich, it is just a guess, i think nodejs watches the file system changes via inotify library. I think there is a limit per user for the max number of watches, which this setting changes to a greater value.
                  – ᐅdevrimbaris
                  May 6 '16 at 7:27






                • 2




                  @devrimbaris Correct!
                  – Erik Åsland
                  May 19 '16 at 22:17






                • 3




                  It has just happened to me after going from Ubuntu 14.04 to Ubuntu 16.04. Your solution worked for me as well. Thank you
                  – Mestre San
                  Jul 26 '16 at 19:45








                • 2




                  Please add some description about the command above ?
                  – Aditya Kresna Permana
                  Jul 25 '17 at 9:14













                up vote
                255
                down vote



                accepted







                up vote
                255
                down vote



                accepted






                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


                But the way it was written first will make this change permanent.






                share|improve this 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


                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


                But the way it was written first will make this change permanent.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited May 24 at 5:12









                MondKin

                9,39963151




                9,39963151










                answered Jan 7 '16 at 20:00









                Erik Åsland

                3,78931738




                3,78931738








                • 5




                  Could someone explain a little more what this does and elaborate on why it could help?
                  – Hinrich
                  Apr 30 '16 at 7:29






                • 10




                  @Hinrich, it is just a guess, i think nodejs watches the file system changes via inotify library. I think there is a limit per user for the max number of watches, which this setting changes to a greater value.
                  – ᐅdevrimbaris
                  May 6 '16 at 7:27






                • 2




                  @devrimbaris Correct!
                  – Erik Åsland
                  May 19 '16 at 22:17






                • 3




                  It has just happened to me after going from Ubuntu 14.04 to Ubuntu 16.04. Your solution worked for me as well. Thank you
                  – Mestre San
                  Jul 26 '16 at 19:45








                • 2




                  Please add some description about the command above ?
                  – Aditya Kresna Permana
                  Jul 25 '17 at 9:14














                • 5




                  Could someone explain a little more what this does and elaborate on why it could help?
                  – Hinrich
                  Apr 30 '16 at 7:29






                • 10




                  @Hinrich, it is just a guess, i think nodejs watches the file system changes via inotify library. I think there is a limit per user for the max number of watches, which this setting changes to a greater value.
                  – ᐅdevrimbaris
                  May 6 '16 at 7:27






                • 2




                  @devrimbaris Correct!
                  – Erik Åsland
                  May 19 '16 at 22:17






                • 3




                  It has just happened to me after going from Ubuntu 14.04 to Ubuntu 16.04. Your solution worked for me as well. Thank you
                  – Mestre San
                  Jul 26 '16 at 19:45








                • 2




                  Please add some description about the command above ?
                  – Aditya Kresna Permana
                  Jul 25 '17 at 9:14








                5




                5




                Could someone explain a little more what this does and elaborate on why it could help?
                – Hinrich
                Apr 30 '16 at 7:29




                Could someone explain a little more what this does and elaborate on why it could help?
                – Hinrich
                Apr 30 '16 at 7:29




                10




                10




                @Hinrich, it is just a guess, i think nodejs watches the file system changes via inotify library. I think there is a limit per user for the max number of watches, which this setting changes to a greater value.
                – ᐅdevrimbaris
                May 6 '16 at 7:27




                @Hinrich, it is just a guess, i think nodejs watches the file system changes via inotify library. I think there is a limit per user for the max number of watches, which this setting changes to a greater value.
                – ᐅdevrimbaris
                May 6 '16 at 7:27




                2




                2




                @devrimbaris Correct!
                – Erik Åsland
                May 19 '16 at 22:17




                @devrimbaris Correct!
                – Erik Åsland
                May 19 '16 at 22:17




                3




                3




                It has just happened to me after going from Ubuntu 14.04 to Ubuntu 16.04. Your solution worked for me as well. Thank you
                – Mestre San
                Jul 26 '16 at 19:45






                It has just happened to me after going from Ubuntu 14.04 to Ubuntu 16.04. Your solution worked for me as well. Thank you
                – Mestre San
                Jul 26 '16 at 19:45






                2




                2




                Please add some description about the command above ?
                – Aditya Kresna Permana
                Jul 25 '17 at 9:14




                Please add some description about the command above ?
                – Aditya Kresna Permana
                Jul 25 '17 at 9:14












                up vote
                13
                down vote













                As per discussion over here, ENOSPC means Error No more hard-disk space available. Reason why this much memory required by nodemon or gulp-nodemon (in my case) is that it was watching contents of a folder which it shouldn't. To fix that nodemon has ignore setting that can be used to tell nodemon what not to watch. Have a look at nodemon sample config here.






                share|improve this answer





















                • Good job, this is the root cause.
                  – lutaoact
                  Feb 22 at 13:24















                up vote
                13
                down vote













                As per discussion over here, ENOSPC means Error No more hard-disk space available. Reason why this much memory required by nodemon or gulp-nodemon (in my case) is that it was watching contents of a folder which it shouldn't. To fix that nodemon has ignore setting that can be used to tell nodemon what not to watch. Have a look at nodemon sample config here.






                share|improve this answer





















                • Good job, this is the root cause.
                  – lutaoact
                  Feb 22 at 13:24













                up vote
                13
                down vote










                up vote
                13
                down vote









                As per discussion over here, ENOSPC means Error No more hard-disk space available. Reason why this much memory required by nodemon or gulp-nodemon (in my case) is that it was watching contents of a folder which it shouldn't. To fix that nodemon has ignore setting that can be used to tell nodemon what not to watch. Have a look at nodemon sample config here.






                share|improve this answer












                As per discussion over here, ENOSPC means Error No more hard-disk space available. Reason why this much memory required by nodemon or gulp-nodemon (in my case) is that it was watching contents of a folder which it shouldn't. To fix that nodemon has ignore setting that can be used to tell nodemon what not to watch. Have a look at nodemon sample config here.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 6 '16 at 18:14









                Zubair Alam

                5,85011820




                5,85011820












                • Good job, this is the root cause.
                  – lutaoact
                  Feb 22 at 13:24


















                • Good job, this is the root cause.
                  – lutaoact
                  Feb 22 at 13:24
















                Good job, this is the root cause.
                – lutaoact
                Feb 22 at 13:24




                Good job, this is the root cause.
                – lutaoact
                Feb 22 at 13:24










                up vote
                13
                down vote













                [nodemon] Internal watch failed: watch /home/Document/nmmExpressServer/bin ENOSPC
                npm ERR! code ELIFECYCLE
                npm ERR! errno 1
                npm ERR! nmmexpressserver@0.0.0 start: `nodemon ./bin/www`
                npm ERR! Exit status 1
                npm ERR!
                npm ERR! Failed at the nmmexpressserver@0.0.0 start script.


                This is the error I got when running nodemon ./bin/www.




                The solution was closing an Atom window that had a entire directory of folders open in the project window.




                I don't know why, but I'm assuming Atom and nodemon use similar processes to watch files/folders.






                share|improve this answer



















                • 1




                  That was exactly my problem. I happeed to launch atom from the project's install directory. I closed atom, launched it from a different dir and the problem went away.
                  – Ya.
                  Jul 22 at 19:16












                • In my case, the same was happening on Sublime in Ubuntu. When I closed the IDE, I could run it properly. Any tips about it?
                  – Shad
                  Sep 20 at 19:42










                • I've not tried to replicate it to see if it has been fixed.
                  – alucinare
                  Sep 21 at 23:30










                • Thanks. Mine can work after I close Gitkraken. This is a strange problem. So that means we can not have two processes monitoring the same folder?
                  – Zhang LongQI
                  Nov 9 at 9:21












                • It was Nextcloud client here - that uses a ton of inotify watches. Thanks, y'all!
                  – Bill McGonigle
                  Nov 23 at 0:49















                up vote
                13
                down vote













                [nodemon] Internal watch failed: watch /home/Document/nmmExpressServer/bin ENOSPC
                npm ERR! code ELIFECYCLE
                npm ERR! errno 1
                npm ERR! nmmexpressserver@0.0.0 start: `nodemon ./bin/www`
                npm ERR! Exit status 1
                npm ERR!
                npm ERR! Failed at the nmmexpressserver@0.0.0 start script.


                This is the error I got when running nodemon ./bin/www.




                The solution was closing an Atom window that had a entire directory of folders open in the project window.




                I don't know why, but I'm assuming Atom and nodemon use similar processes to watch files/folders.






                share|improve this answer



















                • 1




                  That was exactly my problem. I happeed to launch atom from the project's install directory. I closed atom, launched it from a different dir and the problem went away.
                  – Ya.
                  Jul 22 at 19:16












                • In my case, the same was happening on Sublime in Ubuntu. When I closed the IDE, I could run it properly. Any tips about it?
                  – Shad
                  Sep 20 at 19:42










                • I've not tried to replicate it to see if it has been fixed.
                  – alucinare
                  Sep 21 at 23:30










                • Thanks. Mine can work after I close Gitkraken. This is a strange problem. So that means we can not have two processes monitoring the same folder?
                  – Zhang LongQI
                  Nov 9 at 9:21












                • It was Nextcloud client here - that uses a ton of inotify watches. Thanks, y'all!
                  – Bill McGonigle
                  Nov 23 at 0:49













                up vote
                13
                down vote










                up vote
                13
                down vote









                [nodemon] Internal watch failed: watch /home/Document/nmmExpressServer/bin ENOSPC
                npm ERR! code ELIFECYCLE
                npm ERR! errno 1
                npm ERR! nmmexpressserver@0.0.0 start: `nodemon ./bin/www`
                npm ERR! Exit status 1
                npm ERR!
                npm ERR! Failed at the nmmexpressserver@0.0.0 start script.


                This is the error I got when running nodemon ./bin/www.




                The solution was closing an Atom window that had a entire directory of folders open in the project window.




                I don't know why, but I'm assuming Atom and nodemon use similar processes to watch files/folders.






                share|improve this answer














                [nodemon] Internal watch failed: watch /home/Document/nmmExpressServer/bin ENOSPC
                npm ERR! code ELIFECYCLE
                npm ERR! errno 1
                npm ERR! nmmexpressserver@0.0.0 start: `nodemon ./bin/www`
                npm ERR! Exit status 1
                npm ERR!
                npm ERR! Failed at the nmmexpressserver@0.0.0 start script.


                This is the error I got when running nodemon ./bin/www.




                The solution was closing an Atom window that had a entire directory of folders open in the project window.




                I don't know why, but I'm assuming Atom and nodemon use similar processes to watch files/folders.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jul 18 at 18:41









                divinedragon

                1,72883259




                1,72883259










                answered Mar 25 at 3:58









                alucinare

                340310




                340310








                • 1




                  That was exactly my problem. I happeed to launch atom from the project's install directory. I closed atom, launched it from a different dir and the problem went away.
                  – Ya.
                  Jul 22 at 19:16












                • In my case, the same was happening on Sublime in Ubuntu. When I closed the IDE, I could run it properly. Any tips about it?
                  – Shad
                  Sep 20 at 19:42










                • I've not tried to replicate it to see if it has been fixed.
                  – alucinare
                  Sep 21 at 23:30










                • Thanks. Mine can work after I close Gitkraken. This is a strange problem. So that means we can not have two processes monitoring the same folder?
                  – Zhang LongQI
                  Nov 9 at 9:21












                • It was Nextcloud client here - that uses a ton of inotify watches. Thanks, y'all!
                  – Bill McGonigle
                  Nov 23 at 0:49














                • 1




                  That was exactly my problem. I happeed to launch atom from the project's install directory. I closed atom, launched it from a different dir and the problem went away.
                  – Ya.
                  Jul 22 at 19:16












                • In my case, the same was happening on Sublime in Ubuntu. When I closed the IDE, I could run it properly. Any tips about it?
                  – Shad
                  Sep 20 at 19:42










                • I've not tried to replicate it to see if it has been fixed.
                  – alucinare
                  Sep 21 at 23:30










                • Thanks. Mine can work after I close Gitkraken. This is a strange problem. So that means we can not have two processes monitoring the same folder?
                  – Zhang LongQI
                  Nov 9 at 9:21












                • It was Nextcloud client here - that uses a ton of inotify watches. Thanks, y'all!
                  – Bill McGonigle
                  Nov 23 at 0:49








                1




                1




                That was exactly my problem. I happeed to launch atom from the project's install directory. I closed atom, launched it from a different dir and the problem went away.
                – Ya.
                Jul 22 at 19:16






                That was exactly my problem. I happeed to launch atom from the project's install directory. I closed atom, launched it from a different dir and the problem went away.
                – Ya.
                Jul 22 at 19:16














                In my case, the same was happening on Sublime in Ubuntu. When I closed the IDE, I could run it properly. Any tips about it?
                – Shad
                Sep 20 at 19:42




                In my case, the same was happening on Sublime in Ubuntu. When I closed the IDE, I could run it properly. Any tips about it?
                – Shad
                Sep 20 at 19:42












                I've not tried to replicate it to see if it has been fixed.
                – alucinare
                Sep 21 at 23:30




                I've not tried to replicate it to see if it has been fixed.
                – alucinare
                Sep 21 at 23:30












                Thanks. Mine can work after I close Gitkraken. This is a strange problem. So that means we can not have two processes monitoring the same folder?
                – Zhang LongQI
                Nov 9 at 9:21






                Thanks. Mine can work after I close Gitkraken. This is a strange problem. So that means we can not have two processes monitoring the same folder?
                – Zhang LongQI
                Nov 9 at 9:21














                It was Nextcloud client here - that uses a ton of inotify watches. Thanks, y'all!
                – Bill McGonigle
                Nov 23 at 0:49




                It was Nextcloud client here - that uses a ton of inotify watches. Thanks, y'all!
                – Bill McGonigle
                Nov 23 at 0:49










                up vote
                5
                down vote













                Erik,
                You can just kill all the other node processes by




                pkill -f node




                and then restart your server again. It'll work just fine then.






                share|improve this answer

























                  up vote
                  5
                  down vote













                  Erik,
                  You can just kill all the other node processes by




                  pkill -f node




                  and then restart your server again. It'll work just fine then.






                  share|improve this answer























                    up vote
                    5
                    down vote










                    up vote
                    5
                    down vote









                    Erik,
                    You can just kill all the other node processes by




                    pkill -f node




                    and then restart your server again. It'll work just fine then.






                    share|improve this answer












                    Erik,
                    You can just kill all the other node processes by




                    pkill -f node




                    and then restart your server again. It'll work just fine then.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jul 30 at 9:26









                    anshcarter

                    11718




                    11718






















                        up vote
                        5
                        down vote













                        It works for me.



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





                        share|improve this answer



























                          up vote
                          5
                          down vote













                          It works for me.



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





                          share|improve this answer

























                            up vote
                            5
                            down vote










                            up vote
                            5
                            down vote









                            It works for me.



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





                            share|improve this answer














                            It works for me.



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






                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Aug 28 at 8:05









                            Pang

                            6,8291563101




                            6,8291563101










                            answered Aug 21 at 16:48









                            simba

                            147110




                            147110






















                                up vote
                                4
                                down vote













                                Add a nodemon.json configuration file in your root folder and specify ignore patterns for example:



                                nodemon.json



                                {
                                "ignore": [
                                "*.test.js",
                                "dist/*"
                                ]
                                }



                                • Note that by default .git, node_modules, bower_components, .nyc_output, coverage and .sass-cache are ignored so you don't need to add them to your configuration.


                                Explanation: This error happens because you exceeded the max number of watchers allowed by your system (i.e. nodemon has no more disk space to watch all the files - which probably means you are watching not important files). So you ignore non-important files that you don't care about changes in them for example the build output or the test cases.






                                share|improve this answer



























                                  up vote
                                  4
                                  down vote













                                  Add a nodemon.json configuration file in your root folder and specify ignore patterns for example:



                                  nodemon.json



                                  {
                                  "ignore": [
                                  "*.test.js",
                                  "dist/*"
                                  ]
                                  }



                                  • Note that by default .git, node_modules, bower_components, .nyc_output, coverage and .sass-cache are ignored so you don't need to add them to your configuration.


                                  Explanation: This error happens because you exceeded the max number of watchers allowed by your system (i.e. nodemon has no more disk space to watch all the files - which probably means you are watching not important files). So you ignore non-important files that you don't care about changes in them for example the build output or the test cases.






                                  share|improve this answer

























                                    up vote
                                    4
                                    down vote










                                    up vote
                                    4
                                    down vote









                                    Add a nodemon.json configuration file in your root folder and specify ignore patterns for example:



                                    nodemon.json



                                    {
                                    "ignore": [
                                    "*.test.js",
                                    "dist/*"
                                    ]
                                    }



                                    • Note that by default .git, node_modules, bower_components, .nyc_output, coverage and .sass-cache are ignored so you don't need to add them to your configuration.


                                    Explanation: This error happens because you exceeded the max number of watchers allowed by your system (i.e. nodemon has no more disk space to watch all the files - which probably means you are watching not important files). So you ignore non-important files that you don't care about changes in them for example the build output or the test cases.






                                    share|improve this answer














                                    Add a nodemon.json configuration file in your root folder and specify ignore patterns for example:



                                    nodemon.json



                                    {
                                    "ignore": [
                                    "*.test.js",
                                    "dist/*"
                                    ]
                                    }



                                    • Note that by default .git, node_modules, bower_components, .nyc_output, coverage and .sass-cache are ignored so you don't need to add them to your configuration.


                                    Explanation: This error happens because you exceeded the max number of watchers allowed by your system (i.e. nodemon has no more disk space to watch all the files - which probably means you are watching not important files). So you ignore non-important files that you don't care about changes in them for example the build output or the test cases.







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Mar 19 at 13:16

























                                    answered Mar 19 at 13:10









                                    Ahmed Soliman

                                    1159




                                    1159






















                                        up vote
                                        4
                                        down vote













                                        On running node server shows Following Errors and solutions:



                                        nodemon server.js




                                        [nodemon] 1.17.2



                                        [nodemon] to restart at any time, enter rs



                                        [nodemon] watching: .



                                        [nodemon] starting node server.js




                                        [nodemon] Internal watch failed: watch /home/aurum304/jin ENOSPC



                                        sudo pkill -f node


                                        or



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





                                        share|improve this answer



























                                          up vote
                                          4
                                          down vote













                                          On running node server shows Following Errors and solutions:



                                          nodemon server.js




                                          [nodemon] 1.17.2



                                          [nodemon] to restart at any time, enter rs



                                          [nodemon] watching: .



                                          [nodemon] starting node server.js




                                          [nodemon] Internal watch failed: watch /home/aurum304/jin ENOSPC



                                          sudo pkill -f node


                                          or



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





                                          share|improve this answer

























                                            up vote
                                            4
                                            down vote










                                            up vote
                                            4
                                            down vote









                                            On running node server shows Following Errors and solutions:



                                            nodemon server.js




                                            [nodemon] 1.17.2



                                            [nodemon] to restart at any time, enter rs



                                            [nodemon] watching: .



                                            [nodemon] starting node server.js




                                            [nodemon] Internal watch failed: watch /home/aurum304/jin ENOSPC



                                            sudo pkill -f node


                                            or



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





                                            share|improve this answer














                                            On running node server shows Following Errors and solutions:



                                            nodemon server.js




                                            [nodemon] 1.17.2



                                            [nodemon] to restart at any time, enter rs



                                            [nodemon] watching: .



                                            [nodemon] starting node server.js




                                            [nodemon] Internal watch failed: watch /home/aurum304/jin ENOSPC



                                            sudo pkill -f node


                                            or



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






                                            share|improve this answer














                                            share|improve this answer



                                            share|improve this answer








                                            edited Nov 1 at 4:55

























                                            answered Aug 9 at 5:33









                                            Mani Abi Anand

                                            18215




                                            18215






















                                                up vote
                                                0
                                                down vote













                                                I had the same error, but in Ubuntu 14.04 inside Windows 10 (Bash on Ubuntu on Windows). All I did to overcome the error was to update the Creators update, which then allowed me to install 16.04 version of Ubuntu bash and then after installing newest version of node (by this steps) I installed also the newest version of npm and then the nodemon started to work properly.






                                                share|improve this answer

























                                                  up vote
                                                  0
                                                  down vote













                                                  I had the same error, but in Ubuntu 14.04 inside Windows 10 (Bash on Ubuntu on Windows). All I did to overcome the error was to update the Creators update, which then allowed me to install 16.04 version of Ubuntu bash and then after installing newest version of node (by this steps) I installed also the newest version of npm and then the nodemon started to work properly.






                                                  share|improve this answer























                                                    up vote
                                                    0
                                                    down vote










                                                    up vote
                                                    0
                                                    down vote









                                                    I had the same error, but in Ubuntu 14.04 inside Windows 10 (Bash on Ubuntu on Windows). All I did to overcome the error was to update the Creators update, which then allowed me to install 16.04 version of Ubuntu bash and then after installing newest version of node (by this steps) I installed also the newest version of npm and then the nodemon started to work properly.






                                                    share|improve this answer












                                                    I had the same error, but in Ubuntu 14.04 inside Windows 10 (Bash on Ubuntu on Windows). All I did to overcome the error was to update the Creators update, which then allowed me to install 16.04 version of Ubuntu bash and then after installing newest version of node (by this steps) I installed also the newest version of npm and then the nodemon started to work properly.







                                                    share|improve this answer












                                                    share|improve this answer



                                                    share|improve this answer










                                                    answered Jul 16 '17 at 10:59









                                                    Šimon Hrabec

                                                    64116




                                                    64116






















                                                        up vote
                                                        0
                                                        down vote













                                                        Instead of specifying a list of directories to ignore (e.g. negative), you can also specify a list of directories to watch (e.g positive):



                                                        nodemon --watch dir1 --watch dir2  dir1/examples/index.js


                                                        In my particular case, I had one directory I wanted to watch and about nine I wanted to ignore, so specifying '--watch' was much simpler than specifying '--ignore'






                                                        share|improve this answer

























                                                          up vote
                                                          0
                                                          down vote













                                                          Instead of specifying a list of directories to ignore (e.g. negative), you can also specify a list of directories to watch (e.g positive):



                                                          nodemon --watch dir1 --watch dir2  dir1/examples/index.js


                                                          In my particular case, I had one directory I wanted to watch and about nine I wanted to ignore, so specifying '--watch' was much simpler than specifying '--ignore'






                                                          share|improve this answer























                                                            up vote
                                                            0
                                                            down vote










                                                            up vote
                                                            0
                                                            down vote









                                                            Instead of specifying a list of directories to ignore (e.g. negative), you can also specify a list of directories to watch (e.g positive):



                                                            nodemon --watch dir1 --watch dir2  dir1/examples/index.js


                                                            In my particular case, I had one directory I wanted to watch and about nine I wanted to ignore, so specifying '--watch' was much simpler than specifying '--ignore'






                                                            share|improve this answer












                                                            Instead of specifying a list of directories to ignore (e.g. negative), you can also specify a list of directories to watch (e.g positive):



                                                            nodemon --watch dir1 --watch dir2  dir1/examples/index.js


                                                            In my particular case, I had one directory I wanted to watch and about nine I wanted to ignore, so specifying '--watch' was much simpler than specifying '--ignore'







                                                            share|improve this answer












                                                            share|improve this answer



                                                            share|improve this answer










                                                            answered Mar 10 at 0:51









                                                            vt5491

                                                            1,02611019




                                                            1,02611019






















                                                                up vote
                                                                0
                                                                down vote













                                                                After running nodemon ,I got following error



                                                                [nodemon] 1.18.6
                                                                [0] [nodemon] to restart at any time, enter
                                                                rs
                                                                [0] [nodemon] watching: *.*
                                                                [0] [nodemon] starting
                                                                node server.js
                                                                [0] [nodemon] Internal watch failed: ENOSPC: no space left on device, watch 'some filename'
                                                                [0] npm ERR! code ELIFECYCLE
                                                                [0] npm ERR! errno 1
                                                                [0] npm ERR! mernapp@1.0.0 server:
                                                                nodemon server.js
                                                                [0] npm ERR! Exit status 1
                                                                [0] npm ERR!
                                                                [0] npm ERR! Failed at the mernapp@1.0.0 server script.



                                                                But these were resolved after running this command:



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





                                                                share|improve this answer

























                                                                  up vote
                                                                  0
                                                                  down vote













                                                                  After running nodemon ,I got following error



                                                                  [nodemon] 1.18.6
                                                                  [0] [nodemon] to restart at any time, enter
                                                                  rs
                                                                  [0] [nodemon] watching: *.*
                                                                  [0] [nodemon] starting
                                                                  node server.js
                                                                  [0] [nodemon] Internal watch failed: ENOSPC: no space left on device, watch 'some filename'
                                                                  [0] npm ERR! code ELIFECYCLE
                                                                  [0] npm ERR! errno 1
                                                                  [0] npm ERR! mernapp@1.0.0 server:
                                                                  nodemon server.js
                                                                  [0] npm ERR! Exit status 1
                                                                  [0] npm ERR!
                                                                  [0] npm ERR! Failed at the mernapp@1.0.0 server script.



                                                                  But these were resolved after running this command:



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





                                                                  share|improve this answer























                                                                    up vote
                                                                    0
                                                                    down vote










                                                                    up vote
                                                                    0
                                                                    down vote









                                                                    After running nodemon ,I got following error



                                                                    [nodemon] 1.18.6
                                                                    [0] [nodemon] to restart at any time, enter
                                                                    rs
                                                                    [0] [nodemon] watching: *.*
                                                                    [0] [nodemon] starting
                                                                    node server.js
                                                                    [0] [nodemon] Internal watch failed: ENOSPC: no space left on device, watch 'some filename'
                                                                    [0] npm ERR! code ELIFECYCLE
                                                                    [0] npm ERR! errno 1
                                                                    [0] npm ERR! mernapp@1.0.0 server:
                                                                    nodemon server.js
                                                                    [0] npm ERR! Exit status 1
                                                                    [0] npm ERR!
                                                                    [0] npm ERR! Failed at the mernapp@1.0.0 server script.



                                                                    But these were resolved after running this command:



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





                                                                    share|improve this answer












                                                                    After running nodemon ,I got following error



                                                                    [nodemon] 1.18.6
                                                                    [0] [nodemon] to restart at any time, enter
                                                                    rs
                                                                    [0] [nodemon] watching: *.*
                                                                    [0] [nodemon] starting
                                                                    node server.js
                                                                    [0] [nodemon] Internal watch failed: ENOSPC: no space left on device, watch 'some filename'
                                                                    [0] npm ERR! code ELIFECYCLE
                                                                    [0] npm ERR! errno 1
                                                                    [0] npm ERR! mernapp@1.0.0 server:
                                                                    nodemon server.js
                                                                    [0] npm ERR! Exit status 1
                                                                    [0] npm ERR!
                                                                    [0] npm ERR! Failed at the mernapp@1.0.0 server script.



                                                                    But these were resolved after running this command:



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






                                                                    share|improve this answer












                                                                    share|improve this answer



                                                                    share|improve this answer










                                                                    answered Dec 4 at 7:04









                                                                    hardik chugh

                                                                    11




                                                                    11






























                                                                        draft saved

                                                                        draft discarded




















































                                                                        Thanks for contributing an answer to Stack Overflow!


                                                                        • Please be sure to answer the question. Provide details and share your research!

                                                                        But avoid



                                                                        • Asking for help, clarification, or responding to other answers.

                                                                        • Making statements based on opinion; back them up with references or personal experience.


                                                                        To learn more, see our tips on writing great answers.





                                                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                                                        Please pay close attention to the following guidance:


                                                                        • Please be sure to answer the question. Provide details and share your research!

                                                                        But avoid



                                                                        • Asking for help, clarification, or responding to other answers.

                                                                        • Making statements based on opinion; back them up with references or personal experience.


                                                                        To learn more, see our tips on writing great answers.




                                                                        draft saved


                                                                        draft discarded














                                                                        StackExchange.ready(
                                                                        function () {
                                                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f34662574%2fnode-js-getting-error-nodemon-internal-watch-failed-watch-enospc%23new-answer', 'question_page');
                                                                        }
                                                                        );

                                                                        Post as a guest















                                                                        Required, but never shown





















































                                                                        Required, but never shown














                                                                        Required, but never shown












                                                                        Required, but never shown







                                                                        Required, but never shown

































                                                                        Required, but never shown














                                                                        Required, but never shown












                                                                        Required, but never shown







                                                                        Required, but never shown







                                                                        Popular posts from this blog

                                                                        Costa Masnaga

                                                                        Fotorealismo

                                                                        Sidney Franklin