出于某种原因,当我想启动我的React Native项目时,它会停留在'Starting Packager ...'部分.我试图删除节点包,并重新安装它们,通过yarn,npm安装它们,但没有运气.我不知道应该怎么解决这个问题:/(太尴尬了)
博览会弹出后,我运行 npx @react-native-community/cli doctor\n它显示\n\xe2\x9c\x96 Watchman - 用于在开发模式下观察文件系统中的更改
\n我试图按照Ember 101中的示例进行操作.我之前已经使用过这段代码而没有任何问题.重新安装我的ubuntu 14.04后出于无关的原因,我在控制台中运行ember serve时出现错误[见下文].
我尝试了解决这个问题的方法:https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch.我还在.watchmanconfig ignore_dirs上添加了"node_modules"和"bower_components":https://github.com/ember-cli/ember-cli/issues/4101但没有效果.
谁知道我做错了什么/安装不正确?
错误:已触发不可恢复的条件.守望者需要你的帮助!触发条件是在timestamp = 1449200416:inotify-add-watch(/ home/john/Practice/borrowers/tests/unit/models) - >达到了用户对inotify手表总数的限制; 增加fs.inotify.max_user_watches sysctl在解决基础问题之前,所有请求都将继续失败并显示此消息.您可以在https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch找到有关修复此问题的更多信息.
at ChildProcess.<anonymous> (/home/john/Practice/borrowers/node_modules/ember-cli/node_modules/sane/node_modules/fb-watchman/index.js:202:17)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)
Run Code Online (Sandbox Code Playgroud) 反应我在Xcode中构建的本机项目,始终坚持"运行2个4自定义shell脚本"并花费将近5分钟继续.之后,反应包装器中的捆绑过程也需要很长时间.
例如:捆绑index.ios.js [开发,非缩小,hmr禁用]▓▓░░░░░░░░░░░░░░18.3%(412/962),差不多一秒钟只增加一个.但上次我在Windows中构建反应原生Android版本并且捆绑过程非常快.
我已经搜索了一些像这样的解决方案尝试的结果是一样的,有人说是看守问题所以我用brew重新安装守望者,结果也一样,性能没有增加.
RN版本:
react-native-cli:2.0.1
反应原生:0.48.4
使用firebase serve命令在本地为 Firebase 函数提供服务应该可以启用热重载,但这在 Windows 上似乎不起作用,即使安装了watchman。除了npm build在每次代码更改后运行之外,还有更好的解决方案吗?
今天早上运行时npm start,出现错误:
System limit for number of file watchers reached
Run Code Online (Sandbox Code Playgroud)
因为/proc/sys/fs/inotify/max_user_watches已经返回到其初始值(8192)(如何增加 max_user_watches)
我正在使用 MaterialUI 和 formik 进行一个新的 React@17 项目。这篇文章展示了我开始运行的命令。
修改max_user_watches为81920就可以了。但是我想降低 CPU/RAM 的消耗
**如何告诉我的项目(反应VSC)不要那么贪婪**
恩惠-v
版本:2.3.0
无法启动守望者; 回退到NodeWatcher以获取文件系统事件.
访问http://www.ember-cli.com/user-guide/#watchman了解更多信息.
节点:5.0.0
os:linux x64
http://www.ember-cli.com/user-guide/#watchman只有mac的解决方案不适用于ubuntu
我正在尝试在我的手机中运行已经构建的应用程序.当我使用"react-native start"代码启动应用程序时,它会在一段时间后返回以下错误消息
ERROR Watcher took too long to load (NodeWatcher)
Error: Watcher took too long to load (NodeWatcher)
at Timeout._onTimeout (index.js:99:16)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Run Code Online (Sandbox Code Playgroud)
我使用的是Windows 7(32位).对于Windows 7 32位系统,我没有找到任何"Watchman"版本.由于此问题,我在移动设备上安装我的应用后出现以下错误
Reference Error: Can't find varaible: __fbBatchedBridge
Run Code Online (Sandbox Code Playgroud)
编辑:现在我已经将我的系统升级到64位的windows8.但我仍然无法安装守望者.
使用 expo 运行 React Native 应用程序时,我在 watchman 上收到此警告。
watchman warning: opendir(/Users/saashwath/Library/Caches/CloudKit/com.apple.Safari) -> Operation not permitted. Marking this portion of the tree deleted
To clear this warning, run:
watchman watch-del /Users/saashwath ; watchman watch-project /Users/saashwath
Run Code Online (Sandbox Code Playgroud)
如何去掉这个警告。提前致谢:)
几天前我在 Facebook/react-native 上创建了一个问题,但尚未收到回复。为了尝试让我启动并运行,我也会在这里询问。问题链接
我检查了有关此事的其他 SO 帖子,但没有任何建议有帮助。
我正在按照 Mac/iOS 的入门文档来创建 AwesomeProject 示例应用程序。当我使用启动项目时
npx react-native start
Run Code Online (Sandbox Code Playgroud)
并在 Xcode 中构建 iOS 应用程序,应用程序启动(在模拟器中)以显示白色初始屏幕,顶部显示“正在从 Metro 加载...”。大约一分钟后,我收到以下错误:
Could not connect to development server.
Ensure the following:
- Node server is running and available on the same network - run 'npm start' from react-native root
- Node server URL is correctly set in AppDelegate
- WiFi is enabled and connected to the same network as the Node Server
URL: http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.AwesomeProject
Run Code Online (Sandbox Code Playgroud)
在我启动服务器的终端中,我看到:
2021-11-13T16:46:53,199: [cli] unable to talk …Run Code Online (Sandbox Code Playgroud) watchman ×10
react-native ×5
reactjs ×3
ember-cli ×2
ember.js ×2
expo ×1
facebook ×1
firebase ×1
hot-reload ×1
ios ×1
macos ×1
node-modules ×1
timeout ×1
ubuntu ×1
xcode ×1