运行老项目时,执行ionic cordova platform
2021-06-01 本文已影响0人
EndOfJuly
CordovaError: Using " to load non-cordova module "fs" is not supported.instead, add this module to your dependencies and use regular "require" to load it.
解决:代码中找到requirecordovamodule使用的地方:
var fs = context.requirecordovamodule('fs');
如果是在插件中,更新一下插件,如果插件更新不了,可以改为:
var fs = require('fs');