web-dev-qa-db-fra.com

erreur de gardien watch-native, après le démarrage de npm sous Ubuntu 17.10.

J'essaie de démarrer le projet de React-native sur Ubuntu, noeud, npm sont les dernières versions. Selon la documentation, j'ai installé tous les fichiers create-react-native-app officiels et leurs dépendances.

voici mon écran de sortie après le démarrage de npm

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.

screenshot

3
ganeshdeshmukh

exécuter les commandes suivantes ou créer des fichiers bash avec les contenus suivants

exécuter en tant que 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

Essayez ces deux commandes

`watchman watch-del-all`
`watchman shutdown-server`
4
Jonas Modie

essayez cette commande:

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
Aethiss

Pour le dépannage des erreurs WatchMan, consultez cette page here

0
Mwongera808