Using "requireCordovaModule" to load non-cordova module "glob" is not supported

Failed to restore plugin “cordova-plugin-telerik-imagepicker” from config.xml. You might need to try adding it again. Error: Using “requireCordovaModule” to load non-cordova module “fs” is not supported. Instead, add this module to your dependencies and use regular “require” to load it.

Using “requireCordovaModule” to load non-cordova module “glob” is not supported. Instead, add this module to your dependencies and use regular “require” to load it.
[ERROR] An error occurred while running cordova run browser (exit code 1).

1 Like

You are using Cordova v9 maybe?

If so, that’s probably the root of your issue as some changes introduced with v9 aren’t backwards compatible with the plugins (https://cordova.apache.org/announcements/2019/03/22/cordova-cli-release-9.0.0.html)

  1. Report the issue in the plugin and if possible provide a PR to solve the dependency issue
  2. Temporarily downgrade your Cordova to v8.1.2 to build your project till the compatibility problem is solved and published
7 Likes

You can replace keyword “requireCordovaModule” by “require” . And It should work fine.

1 Like

This sounds like exactly what we were looking for, but where exactly can we find the “requireCordovaModule” line to replace!? :thinking: