Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #1224

Closed
GhoshWorld opened this issue Feb 24, 2022 · 1 comment

Comments

@GhoshWorld
Copy link

Bug Report


Failed to restore plugin "cordova-plugin-request-location-accuracy". You might need to try adding it again. Error: CordovaError: 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.

Failed to restore plugin "cordova-plugin-camera". You might need to try adding it again. Error: CordovaError: 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.

Failed to restore plugin "cordova-plugin-network-information". You might need to try adding it again. Error: CordovaError: 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.

Failed to restore plugin "cordova-sms-plugin". You might need to try adding it again. Error: CordovaError: 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.
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.

Problem

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.

Version information


   Ionic CLI                     : 5.4.16 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 5.6.6
   @angular-devkit/build-angular : 0.1102.18
   @angular-devkit/schematics    : 11.2.11
   @angular/cli                  : 11.2.11
   @ionic/angular-toolkit        : 3.1.1

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : not available
   Cordova Plugins   : not available

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v12.18.1 (/usr/local/bin/node)
   npm    : 6.14.5
   OS     : macOS Big Sur
   Xcode  : Xcode 12.5 Build version 12E262```



## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->

- [ ] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [ ] I included all the necessary information above
@breautek
Copy link
Contributor

This is an error for the plugin's maintainers part.

This means the plugin is using requireCordovaModule to import dependencies that cordova has declared, when it should declare/install the dependencies itself and use the normal require() api to import the dependency. This has been enforced as of Cordova CLI 9.x if I recall correctly.

I'd suggest ensuring that your plugins are up-to-date. (Use cordova plugin remove <pluginName> / cordova plugin add <pluginName>@latest). If the issue persists, you may need to report the issue to the plugin's maintainer, or fork the plugin to address the issue yourself. apache/cordova-lib#689 can be referenced for context.

Closing as not-a-bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants