Open jonerose opened 5 years ago
如果是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
错误信息如下: 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! my-app@0.1.0 ios:
react-native-scripts ios
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the my-app@0.1.0 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:
有人遇到这问题吗?重新安装了依赖也不起作用