我开始使用react-native,我按照网站上的教程,但在运行示例项目时,它在终端上返回了一些错误消息:
Looking for JS files in
/Users/username/Desktop/nativeTest/BookSearch
[06:03:00] <START> Building Dependency Graph
[06:03:00] <START> Crawling File System
[06:03:00] <START> Loading bundles layout
[06:03:00] <END> Loading bundles layout (0ms)
React packager ready.
2015-12-13T06:03:01,281: [cli] Failed to open /Users/username/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
2015-12-13T06:03:01,281: [cli] Failed to open /Users/username/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
Watchman: watchman--no-pretty get-sockname returned with exit code null 2015-12-13T06:03:01,281: [cli] Failed to open /Users/username/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
ERROR watchman--no-pretty get-sockname returned with exit code null 2015-12-13T06:03:01,281: [cli] Failed …
Run Code Online (Sandbox Code Playgroud) 我在Ubuntu 15.10上,并且正在使用react-native(0.20.0)开发一个Android(SDK 23)应用程序。我正在使用节点5.6.0和npm 3.6.0。
我在运行时遇到看守错误 react-native start
ERROR watchman--no-pretty get-sockname returned with exit code 127 watchman:
error while loading shared libraries: libpcre.so.1: cannot open shared object
file: No such file or directory
at ChildProcess.<anonymous> (/home/rachael/Dev/InstaGo/node_modules/fb-watchman/index.js:198:18)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:471:12)
Run Code Online (Sandbox Code Playgroud)
当我运行时sudo find / -name libpcre.so.1
,返回以下内容:
/home/rachael/.linuxbrew/lib/libpcre.so.1
/home/rachael/.linuxbrew/Cellar/pcre/8.38/lib/libpcre.so.1
Run Code Online (Sandbox Code Playgroud)
我试过重新安装watchman:
make uninstall
git clone https://github.com/facebook/watchman.git
cd watchman
git checkout v4.1.0 # the latest stable …
Run Code Online (Sandbox Code Playgroud) 我正在使用 React Native,它需要watchman
. 运行时react-native run-ios
,我看到此错误。
watchman --no-pretty get-sockname returned with exit code=1, signal=null,
stderr= 2017-05-05T08:17:49,256: [2110218240] while computing sockname:
failed to create /usr/local/var/run/watchman/foo-state: No such file or directory
Run Code Online (Sandbox Code Playgroud)
经过调查后,这似乎是由于没有/usr/local/
安装标准自制程序造成的。
statedir
他们是改变守望者所使用的方式吗?
嗨,当我想用'react-native start'启动我的应用程序时,我收到此错误.有人知道该怎么办?我试图将watchman文件夹和项目文件夹的权限更改为chmod -R 777'path'
Metro Bundler ready.
Loading dependency graph...watchman warning: opendir(/home/t/react/testApp/android/app/build/generated/source/r/debug/com) -> Permission denied. Marking this portion of the tree deleted
Recrawled this watch 1 times, most recently because:
/home/t/react/testApp: dir missing from internal state
To resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del /home/t/react/testApp ; watchman watch-project /home/t/react/testApp`
opendir(/home/t/react/testApp/android/app/build/generated/source/r/debug/com) -> Permission denied. Marking this portion of the tree deleted
Recrawled this watch 1 times, most recently because:
/home/t/react/testApp: dir missing from internal …
Run Code Online (Sandbox Code Playgroud) 守望者爬行失败.使用节点搜寻器重试一次.通常,当守望者没有跑步时会发生这种情况.
.watchmanconfig
在项目的根文件夹中创建一个空文件,或者在项目中初始化git或hg存储库.错误:watchman --no-pretty get-sockname返回,退出代码= 1,signal = null,stderr = 2018-03-23T11:33:13,360:[0x7fff9755f3c0]/usr/local/var/run/watchman的所有者/ root-state是uid 501,与你的euid 0不匹配
我正在构建一个 React Native 应用程序,并且 javascript 代码更新没有反映在 ios 模拟器中。react-native start
我已使用和重新启动了开发服务器react-native start --reset-cache
。我曾经react-native-clean-project
清理过 pods 文件夹、node_modules 和各种其他缓存。我尝试重新安装watchman
。所有这些努力都没有奏效。
该问题大约在一周前开始,直到那时 javascript 代码才正常更新。目前,当文件因热重载而更改时,它会更新,但是当我重新运行时,react-native run-ios
它会返回到之前的 javascript 版本。
直接从 XCode 构建应用程序也不起作用。它仍然使用过时的 JavaScript 构建。有谁对可能导致此问题的原因有任何想法吗?
最近,我的快速刷新停止在我的所有反应本机项目中工作,我什至尝试初始化一个新项目,但它在那里也不起作用
我已经尝试了以下所有尝试:
-. watchman watch-del-all
-. rm -rf /usr/local/var/run/watchman && brew uninstall watchman && brew install watchman
-. clean node_modules and "npm run -- --reset-cache"
Run Code Online (Sandbox Code Playgroud)
无论我在修改源代码后尝试以何种方式重新加载应用程序,更改都不会得到反映。我必须停止并卸载该应用程序,运行npm run -- --reset-cache
然后npm run android
再次运行才能反映更改。
这真是要了我的命,因为我找不到原因。它之前可以工作,但我没有在我的机器上安装任何应用程序。我现在缺少格式化我的机器并从头开始一切,但这是一台 Mac,重新格式化很麻烦。
我安装了一个反应本机启动项目,在运行时,它要求授予 watchman 访问我系统文件的权限。我天真地拒绝了,但现在每当尝试运行该文件夹时都会收到以下错误:
Error: unable to resolve root /Users/ckoong/Desktop/Repos/rn-starter: failed to opendir(/Users/ckoong/Desktop/Repos/rn-starter): Operation not permitted
at BunserBuf.<anonymous> (/Users/ckoong/Desktop/Repos/rn-starter/node_modules/fb-watchman/index.js:95:23)
at BunserBuf.emit (events.js:315:20)
at BunserBuf.process (/Users/ckoong/Desktop/Repos/rn-starter/node_modules/bser/index.js:292:10)
at /Users/ckoong/Desktop/Repos/rn-starter/node_modules/bser/index.js:247:12
at processTicksAndRejections (internal/process/task_queues.js:75:11)
Emitted 'error' event on WatchmanWatcher instance at:
at Client.<anonymous> (/Users/ckoong/Desktop/Repos/rn-starter/node_modules/jest-haste-map/build/lib/WatchmanWatcher.js:130:10)
at Client.emit (events.js:315:20)
at BunserBuf.<anonymous> (/Users/ckoong/Desktop/Repos/rn-starter/node_modules/fb-watchman/index.js:107:12)
at BunserBuf.emit (events.js:315:20)
at /Users/ckoong/Desktop/Repos/rn-starter/node_modules/bser/index.js:249:12
at processTicksAndRejections (internal/process/task_queues.js:75:11) {
watchmanResponse: {
version: '4.7.0',
error: 'unable to resolve root /Users/ckoong/Desktop/Repos/rn-starter: failed to opendir(/Users/ckoong/Desktop/Repos/rn-starter): Operation not permitted'
Run Code Online (Sandbox Code Playgroud)
我见过很多人说要在系统首选项中授予对守望者的访问权限,但是,在窗口中搜索时,我在系统上的任何地方都没有看到任何对守望者的引用。
我正在为大苏尔工作。
请协助。
当我想在 Android 模拟器上运行我的项目时出现此错误。
[Hot Module Replacement] Server listening on /hot
React packager ready.
Failed to build DependencyGraph: Watchman error: query failed: synchronization failed: Permission denied. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
Error: Watchman error: query failed: synchronization failed: Permission denied. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
at /Users/Ali/Desktop/app/Test/node_modules/react-native/node_modules/node-haste/lib/crawlers/watchman.js:63:11
at process._tickCallback (node.js:368:9)
Run Code Online (Sandbox Code Playgroud)
我试过 "watchman watch ~path" , "sudo" & "chmod" 但他们没有帮助我。
有人可以建议我吗?
自制错误屏幕截图
有人知道为什么我的 Homebrew 无法安装任何软件包并不断显示此错误吗?
我尝试安装 watchman 但 homebrew 显示了此错误,然后我尝试安装其他软件包,但仍然显示此错误。我已经尝试使用安装和重新安装自制程序/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)
。
请帮忙
watchman ×10
react-native ×8
android ×2
homebrew ×2
javascript ×2
node.js ×2
npm ×2
facebook ×1
reactjs ×1
xcode ×1