0

I'm trying to resolve an error with cordova.js associated with cordova_plugins.json. The fix I found on Google mentioned that an empty json file would suffice, so I added cordova_plugins.json to my common folder with a simple message inside:

{
"msg" : "this is a dummy file that might need updating later"
}

The 404 error was resolved by adding this file, but I got a new error in the chrome dev console:

Uncaught TypeError: Object #<Object> has no method 'require' cordova.js:6359

and here is the code block in cordova.js:

    6355: // Called when:
    6356: // * There are plugins defined and all plugins are finished loading.
    6357: // * There are no plugins to load.
    6358: function finishPluginLoading() {
    6359:     context.cordova.require('cordova/channel').onPluginsReady.fire();
    6360: }

The solution for this error online requires deletion of some code in this cordova.js file. This is not possible for worklight since cordova.js is rebuilt/overwritten at build time.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
fatjedi
  • 5
  • 1

1 Answers1

1

Please see my answer to the following question: IBM Worklight 6.0 - How to manipulate Cordova.js file?

This error is harmless. It will be gone in a future release; my suggestion is to simply move on and disregard it.

Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89