简体   繁体   English

React Native无法在Windows Phone中下载JS包

[英]React native unable to download JS bundle in windows phone

Getting this error 得到这个错误

React native unable to download JS bundle in windows desktop when I uploaded zip file on hockeyapp through visual studio.When I stop react native server still getting same error on same system. 当我通过Visual Studio在hockeyapp上上传zip文件时,React Native无法在Windows桌面上下载JS软件包。当我停止React Native服务器仍然在同一系统上遇到相同错误时。

I am not able to run this code on another machine.Please help 我无法在另一台计算机上运行此代码。请帮助

After 2 days surfing, I solved this issue , Now working fine- Previously I was not able to install my windows application (created in react native) in another windows system using hockey app. 冲浪2天后,我解决了这个问题,现在可以正常工作-以前,我无法使用曲棍球应用程序将Windows应用程序(在react native中创建)安装在另一个Windows系统中。 I created app packages in visual studio 2017 but getting error- unable to download js bundle because I was not using offline bundle. 我在Visual Studio 2017中创建了应用程序包,但由于未使用脱机捆绑包而出现错误-无法下载js捆绑包。

So to create debug or release bundle to run on another devices use this command- 因此,要创建调试或发行包以在其他设备上运行,请使用以下命令-

react-native bundle --platform windows --entry-file index.windows.js --bundle-output windows/{your project name}/ReactAssets/index.windows.bundle --assets-dest windows/{your project name}/ReactAssets --dev false (mandatory if you want to create release bundle else not ) react-native bundle --platform windows --entry-file index.windows.js --bundle-output windows / {您的项目名称} /ReactAssets/index.windows.bundle --assets-dest windows / {您的项目名称} / ReactAssets --dev false (如果要创建发行包, 则为必需,否则为)

In my case I was using wrong slash in path in the assets path of above command. 就我而言,我在上述命令的资产路径中的路径中使用了错误的斜杠。 After this step create app packages in visual studio 完成此步骤后,在Visual Studio中创建应用程序包

Upload to HockeyApp or somewhere to distribute your app 上传到HockeyApp或其他地方以分发您的应用

Now you will not get this error 现在您将不会收到此错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM