运行ReactNative工程watchman运行错误

在运行RN工程的时候执行react-native run-android的时候控制台一只出现这个玩意儿~~

Watchman:  watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty
解决方法:

npm下面的包也有watchman,如果安装了先卸载

npm r -g watchman

brew uninstall watchman 
brew link pcre 
brew install --HEAD watchman

然后安装不了出现了错误

Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir - /usr/local/Frameworks

Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

此时尝试解决方案:

brew link --overwrite watchman  继续报错

Error: No such keg: /usr/local/Cellar/watchman

解决方案开放权限:

sudo chown -R whoami /usr/local

sudo mkdir /usr/local/Frameworks

sudo chown $(whoami):admin /usr/local/Frameworks

 brew link --overwrite watchman  然后提示变为:

Error: No such keg: /usr/local/Cellar/watchman

重新安装:

npm install watchman  Ok了

ERROR: Unknown option --no-prettyERROR: Unknown option --no-prettyWatchman: watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty ERROR watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty Error: watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty at ChildProcess.<anonymous> (.../fb-watchman/index.js: 198: 18) at emitTwo (events.js: 106: 13) at ChildProcess.emit (events.js: 191: 7) at maybeClose (internal/child_process.js: 852: 16) at Socket.<anonymous> (internal/child_process.js: 323: 11) at emitOne (events.js: 96: 13) at Socket.emit (events.js: 188: 7) at Pipe._handle.close [ as _onclose] (net.js: 492: 12)


作者:姜家志
链接:https://www.jianshu.com/p/a324bdf977ea
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
ERROR: Unknown option --no-prettyERROR: Unknown option --no-prettyWatchman: watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty ERROR watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty Error: watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty at ChildProcess.<anonymous> (.../fb-watchman/index.js: 198: 18) at emitTwo (events.js: 106: 13) at ChildProcess.emit (events.js: 191: 7) at maybeClose (internal/child_process.js: 852: 16) at Socket.<anonymous> (internal/child_process.js: 323: 11) at emitOne (events.js: 96: 13) at Socket.emit (events.js: 188: 7) at Pipe._handle.close [ as _onclose] (net.js: 492: 12)


作者:姜家志
链接:https://www.jianshu.com/p/a324bdf977ea
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值