question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin fails to install on Cordova 9.x

See original GitHub issue

On Cordova 9.x, the following error occurs during the installation of branch-cordova-sdk:

Failed to install 'branch-cordova-sdk': CordovaError: Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
    at Context.requireCordovaModule (C:\Users\bytenik\Documents\Projects\BallStreet\app\node_modules\cordova-lib\src\hoo
ks\Context.js:57:15)
    at Object.install (C:\Users\bytenik\Documents\Projects\BallStreet\app\plugins\branch-cordova-sdk\src\scripts\npm\dow
nloadNpmDependencies.js:18:23)
    at run (C:\Users\bytenik\Documents\Projects\BallStreet\app\plugins\branch-cordova-sdk\src\scripts\hooks\beforePlugin
Install.js:11:22)
    at runScriptViaModuleLoader (C:\Users\bytenik\Documents\Projects\BallStreet\app\node_modules\cordova-lib\src\hooks\H
ooksRunner.js:181:32)
    at runScript (C:\Users\bytenik\Documents\Projects\BallStreet\app\node_modules\cordova-lib\src\hooks\HooksRunner.js:1
57:16)
    at C:\Users\bytenik\Documents\Projects\BallStreet\app\node_modules\cordova-lib\src\hooks\HooksRunner.js:125:20
    at processTicksAndRejections (internal/process/next_tick.js:81:5)
Failed to restore plugin "branch-cordova-sdk" from config.xml. You might need to try adding it again. Error: Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:13
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
paulstelzercommented, May 1, 2019

I enlarged my fork innomobile-branch-cordova-sdk@3.1.8-beta.2 that removes requireCordovaModule and changed it with normal require. My fork is also using CocoaPods (see #533 - which this official plugin never integrated).

Anyone who wants to test it, take a look at https://www.npmjs.com/package/innomobile-branch-cordova-sdk . The steps:

  1. cordova plugin add innomobile-branch-cordova-sdk

  2. Replace the line with branch-cordova-sdk inside config.xml with <plugin name="innomobile-branch-cordova-sdk" spec="^3.1.8-beta.2" />

I am using it on my app and seems working - but if anyone else can check too would be great 😃

0reactions
echo-branchcommented, Feb 10, 2020

This should be resolved in the latest release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cordova-plugin-device
This plugin defines a global device object, which describes the device's ... UUID which is unique and the same for all apps installed...
Read more >
Cordova-android v 9.0.0 build failed. Invalid ...
Due to API 29 support, I'm trying to upgrade Cordova-android platform to v9.0.0. But I'm facing a strange error. Error:.
Read more >
Cordova SDK Troubleshooting - Visual Studio App Center
One possible cause of this error is when running cordova plugin add cordova-plugin-appcenter-<module> without CocoaPods installed. In this case, ...
Read more >
Failing to add cordova plugin from Github - Builds
Adding it to the project Failed to fetch plugin github:apache/cordova-plugin-file-transfer via registry. Probably this is either a connection problem, or plugin ...
Read more >
cordova
This tool helps with management of multi-platform Cordova applications as well as Cordova plugin integration. Installation. In your command-line ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found