React Native npm start gets stuck at Starting Packager

安稳与你 提交于 2019-12-24 23:14:50

问题


I've made an app with react native - create-react-native-app. Initially npm start worked fine. But now npm start get's stuck at Starting Packager.

A few days ago, deleting the node_modules folder and reinstalling npm dependencies and then doing npm start seemed to work. But now even that doesn't work.

Any help will be appreciated

npm -v 6.0.0 node -v v10.0.0 react-native-cli: 2.0.1 react-native: 0.54.0 os - Ubuntu 16.04


回答1:


The issue was in the

/proc/sys/fs/inotify/max_user_watches = 8192

/proc/sys/fs/inotify/max_queued_events = 16384

Basically, max_user_watches impacts how many dirs you can watch across all watched roots and max_queued_events impacts how likely it is that your system will experience a notification overflow. So while building the native app, these limits used to exceed because of which build process got stuck.

Just increasing these limits makes it work.

To increase the limit use:

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


来源:https://stackoverflow.com/questions/50530220/react-native-npm-start-gets-stuck-at-starting-packager

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