首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm开始不工作create-react-native-app

npm开始不工作create-react-native-app
EN

Stack Overflow用户
提问于 2018-02-20 16:35:34
回答 3查看 2.2K关注 0票数 1

npm版本是4.6.1也参考github link

我创建了一个普通的hello world应用程序,并尝试

代码语言:javascript
复制
create-react-native-app HelloWorldVatsal

创建了应用程序,加载了所有模块等,并在终端上给出了成功消息

在那之后,如下所示

代码语言:javascript
复制
cd HelloWorldVatsal
npm start

代码语言:javascript
复制
HelloWorldVatsal@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
EN

回答 3

Stack Overflow用户

发布于 2018-02-20 16:56:23

正如您从下面显示的错误消息行中看到的;

代码语言:javascript
复制
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或运行错误消息中显示的代码片段。

票数 3
EN

Stack Overflow用户

发布于 2018-06-02 03:02:16

安装watchman对我来说很有效:D

我的系统(mac) --> OSX 10.12.3

代码语言:javascript
复制
brew update

brew install watchman
票数 1
EN

Stack Overflow用户

发布于 2018-08-07 15:08:01

在mac上运行以下命令对我很有效:

sudo sysctl -w kern.maxfiles=5242880

sudo sysctl -w kern.maxfilesperproc=524288

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48880860

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档