IBM Worklight 6.0 - 如何解决缺少的cordova_plugins.json错误?

时间:2013-09-26 16:20:35

标签: cordova ibm-mobilefirst

我正在尝试使用与cordova_plugins.json相关联的cordova.js解决错误。我在Google上找到的修复程序提到空的json文件就足够了,所以我将cordova_plugins.json添加到我的公共文件夹中,其中包含一条简单的消息:

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

通过添加此文件解决了404错误,但我在chrome dev控制台中遇到了一个新错误:

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

这是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: }

此错误在线解决方案需要删除此cordova.js文件中的某些代码。由于在构建时重建/覆盖了cordova.js,因此这对于worklight是不可能的。

1 个答案:

答案 0 :(得分:1)

请参阅我对以下问题的回答:IBM Worklight 6.0 - How to manipulate Cordova.js file?

此错误无害。它将在未来的版本中消失;我的建议是继续前进并忽视它。