Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

根据案例,通过create-react-native-app新建的项目启动报错 #75

Open
jonerose opened this issue Sep 19, 2018 · 1 comment
Open

Comments

@jonerose
Copy link

错误信息如下:
15:54:29: Unable to start server
See https://git.io/v5vcn for more information, either install watchman or run the following snippet:
sudo sysctl -w kern.maxfiles=5242880
sudo sysctl -w kern.maxfilesperproc=524288

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ios: react-native-scripts ios
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] ios script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

有人遇到这问题吗?重新安装了依赖也不起作用

@cncolder
Copy link
Contributor

如果是OSX, 最好是安装 watchman brew install watchman, create-react-app 需要这个监视文件改动, 如果没有的话会使用 node 自带的 fs 模块监视文件, 但是因为文件太多, 超过了系统允许的最大数量, 所以无法启动(Unable to start server)

错误信息中已经提醒你如果不想安装 watchman 可以改动系统参数, 但我记得重启就会失效.

sudo sysctl -w kern.maxfiles=5242880
sudo sysctl -w kern.maxfilesperproc=524288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants