firebase-kotlin-sdk icon indicating copy to clipboard operation
firebase-kotlin-sdk copied to clipboard

Compilation issue for browser target

Open MinmoTech opened this issue 3 years ago • 0 comments
trafficstars

I get the following error while compiling for the browser target:

Compiled with problems:X

ERROR in ./kotlin/kotlin_dev_gitlive_firebase_firestore.js 10:15

Module parse failed: Unexpected token (10:15)
File was processed with these loaders:
 * ../../node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
|       throw new Error("Error loading module 'kotlin_dev_gitlive_firebase_firestore'. Its dependency 'firebase/compat/app' was not found. Please, check whether 'firebase/compat/app' is loaded prior to 'kotlin_dev_gitlive_firebase_firestore'.");
|     }
>     if (typeof default === 'undefined') {
|       throw new Error("Error loading module 'kotlin_dev_gitlive_firebase_firestore'. Its dependency 'firebase/compat/firestore' was not found. Please, check whether 'firebase/compat/firestore' is loaded prior to 'kotlin_dev_gitlive_firebase_firestore'.");
|     }

I'm unsure on how to proceed, I'm using version 1.6.1 of the sdk and kotlin version 1.6.21

I have already tried to add npm dependencies as shown in the readme: https://github.com/GitLiveApp/firebase-kotlin-sdk#npm-modules This also fails as it's unable to resolve the dependencies on npm:

error Couldn't find package "@gitlive/[email protected]" required by "[email protected]" on the "npm" registry.

MinmoTech avatar Jun 07 '22 18:06 MinmoTech