Error: cordova already defined

HI,
On my latest build for both iOS and Android, I am getting the following JS error in my error catcher.

Has anyone else come across this, and or found a fix?

JS ERROR: app://ios.xxxx.net/cordova.js:101:20
build@app://ios.xxxx.net/cordova.js:47:16
require@app://ios.xxxx.net/cordova.js:62:29
app://ios. xxxx.net/cordova.js:2100:2
global code@app://ios.xxxx.net/cordova.js:2104:3
 
Url: app://ios.xxxx.net/cordova.js
Line: 101
CharNo: 47
Error: Error: cordova already defined

image

Volt.build adds in file cordova.js - so I have no control over this.
I just add the link into the html head.
Have looked in the ipa package and everything looks correct.
So has to do with this snippet from cordova.js.

// Workaround for Windows 10 in hosted environment case
// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object
if (window.cordova && !(window.cordova instanceof HTMLElement)) {
    throw new Error('cordova already defined');
}

Tip : If you’re pasting code, html or config files, surround the code with triple back ticks (```), before the first line and after the last one. It will be formatted properly. (We fixed it for you this time)

Could you submit your job again? I’ll like to have a look at the log.

Was my mistake!
I had written [ src name with single quotes ] - src needs to be in double quotes, otherwise it seems volt.build thinks the file is not added in index.html and tries to fix it - looked at the log and found the answer…

don’t do:

<script src='cordova.js' type="text/javascript"></script>

should be:

<script src="cordova.js" type="text/javascript"></script>

Thanks for reporting this - we’ll get this fixed!