[英]Unable to download JS bundle on UWP React Native
环境
react-native -v: 0.47.0
npm ls rnpm-plugin-windows: 0.47.0-RC5
npm ls react-native-windows: yes
node -v:8.2.1
npm -v:5.3.0
yarn --version:n/a
然后,指定:
Target Platform: UWP (developer mode enabled)
Target Platform Version(s):
10.0.10586
.NET 4.6.1, .NET 4.5
Target Device(s):
Mobile ARM
Development Operating System:
Windows 10 Desktop
Visual Studio Version:
Visual Studio 2015
Visual Studio 2017
重现步骤
预期行为
应用程序应加载到显示 index.windows.js 页面内容的屏幕上
实际行为
错误消息指出无法下载 JS Bundle。
可重现的演示
(粘贴示例项目的链接和重现问题的确切说明。) https://github.com/ballySingh/repo2.git
下载 zip 并运行 npm install。 请按照上面复制部分的第 4 步操作。
尝试将 localhost 字符串更改为您的真实 IP
private const string DeviceLocalhost = "localhost:8081" <--- 写下你的IP
在文件中
C:\\git\\plex\\plant-floor-app\\node_modules\\react-native-windows\\ReactWindows\\ReactNative.Shared\\DevSupport\\DevServerHelper.cs
当我在连接到我的工作VPN时运行 React Native 打包程序时遇到了这个问题,一旦我断开工作 VPN 连接,打包程序就能够为我的应用程序选择正确的 IP 接口。 如果您已连接到 VPN,请断开连接并再次运行您的打包程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.