-
Notifications
You must be signed in to change notification settings - Fork 145
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
Cannot find module 'xml2js' #352
Comments
Hello,
I would recommend updating the Branch SDK and going through the testing guide to make sure you are running only 1 Cordova command for the initial Branch SDK install. Thanks, |
I tried following the instructions in those 2 links before posting with no luck. Also, as I said this works fine if I go back to version 2.6.0, but anything newer fails. |
Hello @smithgeek, Thank you for the quick responses. You are correct. Something broke between 2.6.0 and 2.6.4. I have a feeling it is related to 44a7ac1f which was a response to #333. I will continue to investigate to see if a revert or a workaround is needed for this to be correct. I will reach out as soon as a new version is ready. Thanks for finding this. |
I did a npm install for these modules by hand, which got rid of these issues. However now my app will not run on android. No issues with ios as far as I can tell. @ethanneff I tried a few different previous versions, which version would you consider the last 'stable' version for both ios and android? Best regards, |
Hello @mackbrowne, You can target Thanks, |
thanks @ethanneff !! |
Hello again, I apologize for the delay. It appears these issues were related to Cordova. After making the following changes I was able to remove the errors:
|
I'm trying to add this plugin to my cordova project and I'm getting the error "Error: Cannot find module 'xml2js'" when trying to run
cordova plugin add branch-cordova-sdk
. Working backwards it looks like this started in 2.6.1 and I can successfully install 2.6.0.Full Error
cordova plugin add branch-cordova-sdk@2.6.1
Fetching plugin "branch-cordova-sdk@2.6.1" via npm
Installing "branch-cordova-sdk" for android
BRANCH SDK: Installing node dependency xml2js
Subproject Path: CordovaLib
Failed to install 'branch-cordova-sdk':Error: Cannot find module 'xml2js'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at C:\Projects\CordovaTest\plugins\branch-cordova-sdk\src\scripts\lib\xmlHelper.js:5:16
at Object. (C:\Projects\CordovaTest\plugins\branch-cordova-sdk\src\scripts\lib\xmlHelper.js:49:3)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
Error: Cannot find module 'xml2js'
The text was updated successfully, but these errors were encountered: