【发布时间】:2021-07-11 01:34:49
【问题描述】:
我尝试运行expo start 或yarn start,但控制台抛出了错误。在 wsl1 上它工作正常,它显示 QR 码。但是,我必须切换到 wsl2 为我的本地服务器设置 mysql,现在 expo 没有启动。
有时也会出现二维码,但是当我尝试在设备中打开应用程序时,也会出现同样的错误。
Developer tools running on http://localhost:19002
Could not get status from Metro bundler. connect ECONNREFUSED 127.0.0.1:19001
Connecting to Metro bundler failed.
Error: Connecting to Metro bundler failed.
at _waitForRunningAsync (/home/kevsmercs/.nvm/versions/node/v12.13.0/lib/node_modules/expo-cli/node_modules/xdl/src/start/startLegacyReactNativeServerAsync.ts:344:11)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
我认为这里的问题是博览会本身。我试图检查开发人员工具的网址,无法访问该网站。我还尝试使用expo login 检查我的帐户并显示此错误
Fetching the user profile failed
connect ECONNREFUSED 127.0.0.1:8888
connect ECONNREFUSED 127.0.0.1:8888
Error: connect ECONNREFUSED 127.0.0.1:8888
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1128:14)
jest-haste-map:守望者抓取失败。使用节点爬虫重试一次。这通常发生在 watchman 不运行时。在项目的根文件夹中创建一个空的 .watchmanconfig 文件,或者在项目中初始化一个 git 或 hg 存储库。错误:守望者错误:查询失败:同步失败:连接超时。确保 watchman 正在为此项目运行。见https://facebook.github.io/watchman/docs/troubleshooting.html。
I tried multiple fixes but no luck.
1. set `REACT_NATIVE_PACKAGER_HOSTNAME` to my ip using `export`
2. delete `.expo` from root of project and run `expo start -c`
3. turn off windows defender and firewall
4. update `expo-cli` to latest (4.4.1)
5. restart laptop
【问题讨论】:
标签: expo windows-subsystem-for-linux wsl-2