简体   繁体   中英

Visual Studio 2017 Ionic Cordova Empty Page When Debugging

I am new to Cordova and Ionic. I just finished installing the Ionic 2 template for Visual Studio 2017. When I run the debugger, it shows only an empty screen.

There is something in the console log:

"deviceready has not fired after 5 seconds."

"Channel not fired:onCordovaInfoReady"

How can I fix this?

I install the template from here


NOTE

Because there is a problem with the @ionic/app-script.js, I ran this command:

npm install @ionic/app-scripts@latest --save-dev

and upgraded the app-script.js into version 3.2.4.

Is the error related to this? Because, the template was using app-script version 1.0.0.

Finally I fix it. If you right click the debugging page then inspect it (Chrome inspector). There is error in the main.js .

Place:

<script src="build/vendor.js"></script>

before

<script src="build/main.js"></script>

in the src/index.html not in the www/index.html because the www/index.html will get overriden on build.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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