我開始使用react-native,並且我遵循網站上的教程,但運行示例項目時,它在終端上返回了一些錯誤消息:運行反應本機初始項目時,watchman.plist權限被拒絕
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 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 to open /Users/username/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
at ChildProcess.<anonymous> (/Users/username/Desktop/nativeTest/BookSearch/node_modules/fb-watchman/index.js:194:18)
at emitTwo (events.js:88:13)
at ChildProcess.emit (events.js:173:7)
at maybeClose (internal/child_process.js:819:16)
at Socket.<anonymous> (internal/child_process.js:320:11)
at emitOne (events.js:78:13)
at Socket.emit (events.js:170:7)
at Pipe._onclose (net.js:470:12)
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
~
Process terminated. Press <enter> to close the window
我試圖chmod com.github.facebook.watchman.plist,但實際上這裏沒有這樣的文件。也許我應該改變文件的路徑?
其他的事情我已經試過:
- 釀造更新
- 沖泡升級守望
- 釀造卸載守望& &釀造安裝--HEAD守望
- 重新啓動,重新初始化項目
包裝版本(如需要):
- 節點:V5.2.0
- 守望者:V4.2.0
問題解決了,謝謝!我沒有意識到plist文件將在第一次運行守望者時創建,'〜/ Library/LaunchAgent'仍然由root擁有。 – xander
地雷是不同的。如何解決這個問題 '$ ls -ld〜/ Library/LaunchAgents' 'lrwxr-xr-x 1 muhaimincs staff 46 Aug 16 11:03/Users/muhaimincs/Library/LaunchAgents - >/usr/local/opt/mysql/homebrew.mxcl.mysql.plist' – Muhaimin
這是我想念'〜/ Library/LaunchAgents/com.github.facebook.watchman.plist'。你可以在這裏看到我的問題http://stackoverflow.com/questions/34912523/error-watchman-no-pretty-get-sockname-when-run-npm-start – Muhaimin