"This relative module was not found" when using a Capacitor plugin
-
I’m building a Quasar app, and would like to use the popular codetrix-studio CapacitorGoogleAuth within my app. I’ll save you a click, here is the NPMjs page. I had a great experience with this plugin in the past, but now I’m stuck with an error:
ERROR Failed to compile with 1 errors This relative module was not found: * ../../../../../capacitor.config.json in ./node_modules/@codetrix-studio/capacitor-google-auth/dist/esm/web.js
I’m running my dev server from my project root (here, the ‘client’ folder):
I found the culprit: this import causes the error:
import '@codetrix-studio/capacitor-google-auth'
The app can compile if I remove this import, but then the plugin won’t work.
I tried restarting the server, removing my node_modules, with no effect, but also deleting the
src-capacitor
folder and starting over.Nothing really works, the error is not wrong though, the file does not exist (capacitor.config.json should be in
src-capacitor
and not project root afaik).If this error is not linked to Quasar, can you tell me where I can find some help?
Thank you
-
@yhu420 you need to point the path to src-capacitor/node_modules, using the
app
alias, try thisimport app/src-capacitor/node_modules/@codetrix-studio/capacitor-google-auth
. -
Thank you very much @metalsadman! That’s not something I could have found myself.
I’m running into ssl errors now but I’ll save that for another topic. Thanks again!