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

冷暖自知 提交于 2021-02-19 03:20:31

问题


Error: ENOSPC: no space left on device, watch '/home/me/Desktop/Edu/Web/JS/React/weather_app/public'

I have over 700gb free space on my HDD, so don't think it is related to the error.

!After the error it became unavailable to run 'npm start' on any project present on my machine.

Today I started work on my project that I left yesterday evening in a perfectly working state. I wanted to add redux to my React project. Steps I made were:

  1. Initializing a local git repository and commiting the key importance files

  2. Downloading redux and react-redux packages via npm

  3. npm start - here the trouble started

OS: ubuntu 16.04 LTS

Node.js version: 10.7.0

npm version: 6.2.0

Also I have tried couple of options suggested on GitHub and this one => link


回答1:


Run the below command to avoid ENOSPC:

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

After that execute:

sysctl --system



回答2:


Changing the default browser worked for me. I am actually not sure why.




回答3:


My AVG Antivirus labeled electron.exe as a malicious file and removed it from the project directory. Restoring it from the quarantine and adding an exception on AVG removed the error for me



来源:https://stackoverflow.com/questions/51630227/events-js167-throw-er-unhandled-error-event

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!