反应原生:React packager准备好了。 ERROR Watcher花了很长时间才加载

时间:2016-01-21 23:40:18

标签: android react-native watchman

我试图在本机上运行一个android项目,但是当我试图使用这个命令运行它时:react-native start那么它会给我留下这个错误:

Looking for JS files in
   C:\Users\mohammad\Desktop\AwsoneProject

[2:55:39 AM] <START> Building Dependency Graph
[2:55:40 AM] <START> Crawling File System
[2:55:40 AM] <START> Loading bundles layout
[2:55:40 AM] <END>   Loading bundles layout (1ms)

React packager ready.

 ERROR  Watcher took too long to load
Try running `watchman version` from your terminal
https://facebook.github.io/watchman/docs/troubleshooting.html
Error: Watcher took too long to load
Try running `watchman version` from your terminal
https://facebook.github.io/watchman/docs/troubleshooting.html
    at [object Object]._onTimeout (index.js:103:16)
    at Timer.listOnTimeout (timers.js:92:15)

See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
我已经在网上搜索,但是几小时后我仍然无法修复它。 我必须提到我在这种情况下使用Windows。 我很感激任何帮助。

2 个答案:

答案 0 :(得分:5)

这实际上是Windows特有的问题。它对我来说在Linux上运行良好。增加FileWatcher中的 MAX_WAIT_TIME 。它实际上超时了。

this

进行检查

你必须增加这个:

const MAX_WAIT_TIME = 120000;

答案 1 :(得分:2)