npm版本是4.6.1也参考github link
我创建了一个普通的hello world应用程序,并尝试
create-react-native-app HelloWorldVatsal创建了应用程序,加载了所有模块等,并在终端上给出了成功消息
在那之后,如下所示
cd HelloWorldVatsal
npm startHelloWorldVatsal@0.1.0 start /home/mvix-vatsal/HelloWorldVatsal
react-native-scripts start
14:52:58: Unable to start server
See https://git.io/v5vcn for more information, either install watchman or run the following snippet:
sudo sysctl -w fs.inotify.max_user_instances=1024
sudo sysctl -w fs.inotify.max_user_watches=12288
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! HelloWorldVatsal@0.1.0 start: `react-native-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the HelloWorldVatsal@0.1.0 start 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:
npm ERR! /home/mvix-vatsal/.npm/_logs/2018-02-19T09_22_58_504Z-debug.log发布于 2018-02-20 16:56:23
正如您从下面显示的错误消息行中看到的;
See https://git.io/v5vcn for more information, either install watchman or run the following snippet:
sudo sysctl -w fs.inotify.max_user_instances=1024
sudo sysctl -w fs.inotify.max_user_watches=12288您需要安装watchman或运行错误消息中显示的代码片段。
发布于 2018-06-02 03:02:16
安装watchman对我来说很有效:D
我的系统(mac) --> OSX 10.12.3
brew update
brew install watchman发布于 2018-08-07 15:08:01
在mac上运行以下命令对我很有效:
sudo sysctl -w kern.maxfiles=5242880
sudo sysctl -w kern.maxfilesperproc=524288
https://stackoverflow.com/questions/48880860
复制相似问题