AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1022742
Accepted
GD- Ganesh Deshmukh
GD- Ganesh Deshmukh
Asked: 2018-04-07 20:46:33 +0800 CST2018-04-07 20:46:33 +0800 CST 2018-04-07 20:46:33 +0800 CST

react-native watchman 错误,在 Ubuntu 17.10 上启动 npm 之后。

  • 772

我正在尝试在 Ubuntu 上启动 React-native 项目,node、npm 是最新版本。根据文档,我已经安装了所有官方create-react-native-app及其依赖项。

这是 npm start 后的输出屏幕

gd@gd:~/Desktop$ cd testing7/
gd@gd:~/Desktop/testing7$ npm start

> [email protected] start /home/gd/Desktop/testing7
> react-native-scripts start

10:01:07: Starting packager...
***ERROR STARTING PACKAGER***
Starting React Native packager...
Scanning folders for symlinks in /home/gd/Desktop/testing7/node_modules (44ms)
Loading dependency graph.



jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
  Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
  Error: Watchman error: A non-recoverable condition has triggered.  Watchman needs your help!
The triggering condition was at timestamp=1523075484: opendir(/home/gd/Desktop/testing7/node_modules/metro/node_modules/ansi-regex) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl
All requests will continue to fail with this message until you resolve
the underlying problem.  You will find more information on fixing this at
https://facebook.github.io/watchman/docs/troubleshooting.html#poison-opendir. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.

截屏

dependencies npm
  • 4 4 个回答
  • 5648 Views

4 个回答

  • Voted
  1. Jonas Modie
    2018-08-04T04:35:17+08:002018-08-04T04:35:17+08:00

    试试这两个命令

    `watchman watch-del-all`
    `watchman shutdown-server`
    
    • 5
  2. Aethiss
    2018-07-01T04:27:44+08:002018-07-01T04:27:44+08:00

    试试这个命令:

    echo 256 | sudo tee -a /proc/sys/fs/inotify/max_user_instances
    echo 32768 | sudo tee -a /proc/sys/fs/inotify/max_queued_events
    echo 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
    watchman shutdown-server
    
    • 1
  3. Best Answer
    GD- Ganesh Deshmukh
    2018-08-04T09:57:36+08:002018-08-04T09:57:36+08:00

    运行以下命令或制作具有以下内容的 bash 文件和

    运行为bash yourfilename.sh

    touch .watchmanconfig
    watchman watch-del-all
    watchman shutdown-server
    sudo pkill -9 -x fseventsd
    echo fs.inotify.max_user_instances=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
    echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
    echo fs.inotify.max_queued_events=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
    
    • 1
  4. Mwongera808
    2019-06-20T04:05:58+08:002019-06-20T04:05:58+08:00

    要解决 WatchMan 错误,请在此处查看此页面

    • 0

相关问题

  • 升级到 10.10 时出错

  • 我可以看到为什么要安装一个包吗?

  • 安装:webmin依赖问题排查

  • 如何将具有依赖项的包上传到我的 PPA?

  • 如何删除已卸载包的依赖项?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve