Relative module reference does not work with monorepo directory structure
In our monorepo project, all nom dependencies are hoisted to the root directory's node_modules directory. In /node_modules/@codetrix-studio/capacitor-google-auth/dist/esm/web.js you reference ../../../../../capacitor.config.json, which obviously does not work as the capacitor.config.json file is in a subdirectory of the root.
Any ideas on how to solve this issue?
I'm getting the same error in a standard ionic project.
Short Hack, I Have used
Goto node_modules/@codetrix-studio/capacitor-google-auth/dist/esm/web.js
Replace capacitor.config.json to ionic.config.json
import { WebPlugin } from '@capacitor/core'; // @ts-ignore //import config from '../../../../../capacitor.config.json'; import config from '../../../../../ionic.config.json';
In your ionic.config.json
{ "name": "xxxxx", "integrations": { "capacitor": {} }, "type": "angular", "plugins": { "SplashScreen": { "launchShowDuration": 0 }, "GoogleAuth": { "scopes": [ "profile", "email" ], "serverClientId": "xxxxxxxx.googleusercontent.com", "forceCodeForRefreshToken": true } } }