【问题标题】:Metro bundler link 19000 shows json dump on react native expo instead of bundler web page with qr codeMetro bundler 链接 19000 在 react native expo 上显示 json 转储,而不是带有 qr 代码的 bundler 网页
【发布时间】:2022-08-08 15:21:59
【问题描述】:

我通常运行 expo start 或 expo start -c ,浏览器将在 localhost:19000 自动打开,其中包含显示 qr 代码、连接:隧道、局域网、本地的 Metro bundler 详细信息,当然还有 exp:应用程序的地址。

突然,当我运行 expo start 时,浏览器不再打开。当我导航到 localhost:19000 时,它会显示一个 json 转储:

{\"name\":\"litplans\",\"slug\":\"litplans\",\"version\":\"1.0.0\",\"orientation\":\"portrait\",\"icon\":\"./assets/icon.png\",\"userInterfaceStyle\":\"light\",\"splash\":{\"image\":\"./assets/splash.png\",\"resizeMode\":\"contain\",\"backgroundColor\":\"#ffffff\",\"imageUrl\":\"http://127.0.0.1:19000/assets/./assets/splash.png\"},\"updates\":{\"fallbackToCacheTimeout\":0},\"assetBundlePatterns\":[\"**/*\"],\"ios\":{\"supportsTablet\":true,\"bundleIdentifier\":\"com.mallsecinc.litplans\"},\"android\":{\"adaptiveIcon\":{\"foregroundImage\":\"./assets/adaptive-icon.png\",\"backgroundColor\":\"#FFFFFF\",\"foregroundImageUrl\":\"http://127.0.0.1:19000/assets/./assets/adaptive-icon.png\"}},\"web\":{\"favicon\":\"./assets/favicon.png\"},\"_internal\":{\"isDebug\":false,\"projectRoot\":\"C:\\\\sites\\\\apps\\\\litplans\",\"dynamicConfigPath\":null,\"staticConfigPath\":\"C:\\\\sites\\\\apps\\\\litplans\\\\app.json\",\"packageJsonPath\":\"C:\\\\sites\\\\apps\\\\litplans\\\\package.json\"},\"sdkVersion\":\"45.0.0\",\"platforms\":[\"ios\",\"android\",\"web\"],\"developer\":{\"tool\":\"expo-cli\",\"projectRoot\":\"C:\\\\sites\\\\apps\\\\litplans\"},\"packagerOpts\":{\"scheme\":null,\"hostType\":\"lan\",\"lanType\":\"ip\",\"devClient\":false,\"dev\":true,\"minify\":false,\"urlRandomness\":\"2x-kif\",\"https\":false},\"mainModuleName\":\"node_modules\\\\expo\\\\AppEntry\",\"__flipperHack\":\"React Native packager is running\",\"debuggerHost\":\"127.0.0.1:19000\",\"logUrl\":\"http://127.0.0.1:19000/logs\",\"hostUri\":\"127.0.0.1:19000\",\"bundleUrl\":\"http://127.0.0.1:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false\",\"iconUrl\":\"http://127.0.0.1:19000/assets/./assets/icon.png\"}

我唯一不同的是卸载和安装 node.js。

为了解决问题,我做了以下事情:

  • 尝试运行现有的博览会项目。
  • 列表项
  • 开始一个全新的展览项目。
  • 删除 node_modules 并重新安装
  • 移除 expo 模块并重新安装

    标签: react-native expo metro-bundler


    【解决方案1】:

    对我来说,使用“start”:“expo start”而不是“start”:“expo start --dev-client”可能会起作用,如果你分享你的依赖关系看起来会很有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-06
      • 2020-03-15
      • 2021-02-26
      • 2022-07-30
      相关资源
      最近更新 更多