在运行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
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。