[英]Unable to download JS bundle on UWP React Native
Environment环境
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
Then, specify:然后,指定:
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
Steps to Reproduce重现步骤
Expected Behavior预期行为
App should load on the screen showing the contents of index.windows.js page应用程序应加载到显示 index.windows.js 页面内容的屏幕上
Actual Behavior实际行为
Error message stating unable to download JS Bundle.错误消息指出无法下载 JS Bundle。
Reproducible Demo可重现的演示
(Paste the link to an example project and exact instructions to reproduce the issue.) https://github.com/ballySingh/repo2.git (粘贴示例项目的链接和重现问题的确切说明。) https://github.com/ballySingh/repo2.git
Download the zip and run npm install.下载 zip 并运行 npm install。 Please follow step 4 from the reproduction section, above.请按照上面复制部分的第 4 步操作。
Try change localhost string to your real IP尝试将 localhost 字符串更改为您的真实 IP
private const string DeviceLocalhost = "localhost:8081" <--- write your IP private const string DeviceLocalhost = "localhost:8081" <--- 写下你的IP
in file在文件中
C:\\git\\plex\\plant-floor-app\\node_modules\\react-native-windows\\ReactWindows\\ReactNative.Shared\\DevSupport\\DevServerHelper.cs C:\\git\\plex\\plant-floor-app\\node_modules\\react-native-windows\\ReactWindows\\ReactNative.Shared\\DevSupport\\DevServerHelper.cs
I had this issue when I was running the react native packager while connected to my work VPN once I disconnected my work VPN connection the packager was able to pick up the correct IP interface for my app.当我在连接到我的工作VPN时运行 React Native 打包程序时遇到了这个问题,一旦我断开工作 VPN 连接,打包程序就能够为我的应用程序选择正确的 IP 接口。 If you are connected to VPN, please disconnect and run your packager again.如果您已连接到 VPN,请断开连接并再次运行您的打包程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.