ENOSPC Error in create-react-app

a 夏天 提交于 2020-07-17 11:10:20

问题


create-react-app error

I get this error message when I run yarn start from my terminal... I've tried sudo killall node and many other process to clear the i-node yet no success.

I have also downgraded my create-react-app version to version 1.5.1 and yet I still have these errors...

Please can anyone help out?


回答1:


You're most likely hitting the Unix limit of how many files a process can watch.

The following command should help:

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



回答2:


By default linux machine puts some limit on number of programs inotify program can watch/monitor.

On running the react development server, the create-react-app ask the inotify program to monitor more files than its limit. Babel and webpack in the creat-react-app are using chokidar to monitor files which in turn is using inotify program to monitor them, hence this crosses the limit of inotify program.

By running the following command the limit of inotify program is increased and issue is solved.

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


来源:https://stackoverflow.com/questions/50793920/enospc-error-in-create-react-app

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