Before the last update all my projects where working as a charme. After the upgrade whenever I try to SIMULATE an App I get in the debug console:
"Uncaught module cordova-plugin-splashscreen.SplashScreen already defined cordova.js:79"
"Uncaught module cordova-plugin-device.device already defined cordova.js:79"
"Uncaught module cordova-plugin-statusbar.statusbar already defined ordova.js: 79"
I'm using a HTML5+Cordova newly created project and I can see there is the cordova.js included in the HTML file and one cordova_plugins.js is automatically added *SOMETIMES* while in the Simulation phase.
My index.html contains this headers :
And this is how the Simulation debug console looks (when the situation ins with both cordova_files).
This errors appeare both when the Simulator adds cordova.js and cordova_plugins.js, and also when the simulator is including only cordova.js.
The application is correctly recognizing navigator.splashscreen or window.device, but what this series of errors?
Can someone please explain me how to solve this "issue"? Thanks in advance.
These errors appeared also in the previous emulator that was integrated in the Intel XDK, based on Ripple. The only difference was that the console was cleared when you open it, by default. You can safely ignore those errors.
Is your application working correctly under simulation? Or you just were concerned about these errors?
The application works flawlessy (until I put some very personal bugs in it), my concerns where about the unconsistency of the errors and that sporadic "double cordova include" while debugging.
Thanks to both of you for the answers (I really want to let you know I appreciate the work you do on this forum).
Dario is correct. The files cordova.js and cordova_plugins.js are special files that are created by Cordova CLI. They are not meant to be modified by hand nor should they be removed from the Simulate tab's project, they are necessary to make the Simulate tab work as a Cordova application. Your index.html file should have a reference to the cordova.js file, it should not, however, have a direct reference to the cordova_plugins.js file.