无法为 react-native 项目运行 npm start [英] unable to run npm start for react-native project
本文介绍了无法为 react-native 项目运行 npm start的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我第一次尝试运行 react-native 项目.按照本机方面提到的所有说明进行操作.并运行'npm start'在命令提示符下出现以下错误:
This is my first attempt at running react-native project. Followed all the instructions mentioned at react-native side. and ran 'npm start' Getting below error in command prompt :
ERROR watchman--no-pretty get-sockname returned with exit code null dyld: Library not loaded: /usr/local/lib/libpcre.1.dylib
Referenced from: /usr/local/bin/watchman
Reason: image not found
Error: watchman--no-pretty get-sockname returned with exit code null dyld: Library not loaded: /usr/local/lib/libpcre.1.dylib
Referenced from: /usr/local/bin/watchman
Reason: image not found
at ChildProcess.<anonymous> (/Users/z013mrq/AwesomeProject/node_modules/react-native/node_modules/sane/node_modules/fb-watchman/index.js:198:18)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)
推荐答案
尝试重新安装守望者:
npm r -g watchman
brew update && brew upgrade
brew install watchman
如果这不能解决问题,请尝试答案张贴在这里.
If that doesn't fix it, try the answers posted here.
尝试通过以下方式重新安装 libtool:
Try to re-install libtool by:
brew 重新安装 libtool --universal &&brew unlink libtool &&酿造链接库工具
如果没有帮助,请尝试将其完全删除并重新尝试上述操作再次:
If won't help, try to remove it completely and re-try above again:
brew 卸载 libtool
这篇关于无法为 react-native 项目运行 npm start的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文