antd-mobile-samples icon indicating copy to clipboard operation
antd-mobile-samples copied to clipboard

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

Open jonerose opened this issue 5 years ago • 1 comments

错误信息如下: 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:

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

jonerose avatar Sep 19 '18 07:09 jonerose

如果是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

cncolder avatar Sep 27 '18 04:09 cncolder