gpt4 book ai didi

node.js - watchman.plist 权限在运行 react-native 初始项目时被拒绝

转载 作者:搜寻专家 更新时间:2023-10-31 22:59:12 25 4
gpt4 key购买 nike

我开始使用 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 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 但实际上那里没有这样的文件。也许我应该更改文件的路径?

我尝试过的其他事情:

  1. 酿造更新
  2. 酿造升级守望者
  3. brew uninstall watchman && brew install --HEAD watchman
  4. 重新启动并重新启动项目

包版本(如果需要):

  1. Node :v5.2.0
  2. 守望者:v4.2.0

最佳答案

当前用户没有文件夹 /Users/[username]/Library/LaunchAgents 的权限。

使用下面的命令来解决这个问题:

$ sudo chown $(whoami) /Users/$(whoami)/Library/LaunchAgents

关于node.js - watchman.plist 权限在运行 react-native 初始项目时被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34245678/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com