Unsatisfied version 0 from shell of shared singleton module firebase/messaging (required ^9.17.1) at getStrictSingletonVersion
Asked Answered
A

0

6

Basically i want to add Firebase on my Angular app. I am using NX Module Federation and after i do npm i firebase i get the error above. I have one package.json for all microservices and shell together so there can't be version mismatch, i guess? Versions: Angular 15.0, Firebase 9.17.1, @firebase/messaging 0.12.1

webpack.config.js

const { withModuleFederation } = require('@nrwl/angular/module-federation');
const config = require('./module-federation.config');
module.exports = withModuleFederation(config);

module-federation.config.js

module.exports = {
  name: 'shell',
  remotes: [],
//added shared in hope to fix problem
  shared: {
    firebase: {
      singleton: true,
      requiredVersion: '9.17.1',
      import: 'firebase/app',
    }
  },
};

After adding shared in module-federation.config.js i got some other error and my app would even start: TypeError: sharedFn is not a function

If anyone got similar problem i would like to hear suggestions on how to fix this nonsense.

After adding shared i tried installing devkit, following chatGPT instructions but i got some even worse problems. Tried changing some versions of firebase but same thing.

Alcinia answered 20/2, 2023 at 15:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.