Node.js: what is ENOSPC error and how to solve?

后端 未结 16 2550
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 08:52

I have a problem with Node.js and uploading files to server. For uploading files to server I use this plugin. When starting file upload to the server, Node.js process crashe

16条回答
  •  我在风中等你
    2020-11-22 09:20

    A simple way that solve my problem was:

    npm cache clear
    

    npm or a process controlled by it is watching too many files. Updating max_user_watches on the build node can fix it forever. For debian put the following on terminal:

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

    If you want know how Increase the amount of inotify watchers only click on link.

提交回复
热议问题