gpt4 book ai didi

react-native - 在我尝试在终端上运行 npm start 后,React native 不会在 chrome 上启动 metro bundler

转载 作者:行者123 更新时间:2023-12-05 05:58:00 27 4
gpt4 key购买 nike

metro bundler我正在尝试运行其他程序员发布的应用程序,但当我在终端上键入 npm start 时,它不会在 google chrome 上运行 metro bundler。

另一方面,我创建了一个项目并运行它,它运行良好 my project

最佳答案

打开新终端并运行下面的命令,它将调出 expo dev 客户端。

expo start --dev-client

enter image description here


有时会报如下错误。

Missing package "metro/src/lib/attachWebsocketServer" in the project. This usually means react-native is not installed. Please verify that dependencies in package.json include "react-native" and run yarn or npm install.

要解决此问题,请运行命令

npm install -g expo-cli
npm install expo-dev-client
expo start --dev-client

关于react-native - 在我尝试在终端上运行 npm start 后,React native 不会在 chrome 上启动 metro bundler,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68638156/

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