No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    "This relative module was not found" when using a Capacitor plugin

    Help
    capacitor error npm plugins
    2
    3
    457
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y
      yhu420 last edited by

      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):
      image

      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

      metalsadman 1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman @yhu420 last edited by metalsadman

        @yhu420 you need to point the path to src-capacitor/node_modules, using the app alias, try this import app/src-capacitor/node_modules/@codetrix-studio/capacitor-google-auth.

        1 Reply Last reply Reply Quote 1
        • Y
          yhu420 last edited by

          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!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post