Capacitor seems like to not install Userbase Cordova Plugin #4425
-
Hi, I would like to use a Cordova plugin in my capacitor project. The cordova plugin : The error : E/Capacitor/Console: File: capacitor-runtime.js - Line 361 - Msg: module cordova-plugin-userbase.userbase-js not found
E/Capacitor: JavaScript Error: {"type":"js.error","error":{"message":"Uncaught module cordova-plugin-userbase.userbase-js not found","url":"capacitor-runtime.js","line":1155,"col":17,"errorObject":"\"module cordova-plugin-userbase.userbase-js not found\""}}
E/Capacitor/Console: File: capacitor-runtime.js - Line 1155 - Msg: Uncaught module cordova-plugin-userbase.userbase-js not found Doctor :
Commands I have run to (try to) install it :
Thanks to anyone who see this. Hope some can help me. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This is a Capacitor bug. I don't thin we will fix it as it would require injecting the node_modules folder and people might have other files there that are not part of Cordova plugins. Try reporting an issue on their repository and ask if they can distribute this file from www folder instead of from node_modules |
Beta Was this translation helpful? Give feedback.
This is a Capacitor bug.
To speed things up, Capacitor injects Cordova plugin files, but only do it for files in "plugins" folder.
userbase plugin copy a file to a
node_modules
folder, so it doesn't get injected, and the other plugin injected file depends on this one, since it's not injected it doesn't find the module.I don't thin we will fix it as it would require injecting the node_modules folder and people might have other files there that are not part of Cordova plugins.
Try reporting an issue on their repository and ask if they can distribute this file from www folder instead of from node_modules
https://github.com/smallbets/userbase/blob/master/src/cordova-plugin-userbase/plugin.xm…