1

I am working on an Angular project and I keep getting the warning "required version specified and unable to automatically determine one. Unable to find required version for "@angular/common" in description file (/path/to/package.json). It need to be in dependencies, devDependencies or peerDependencies." I have tried adding "@angular/common" to my package.json but the warning still persists. How can I solve this warning?

new ModuleFederationPlugin({
  name: 'config',
  library: { type: 'var', name: 'config' },
  filename: 'remoteEntry.js',
  exposes: {
    ConfigModule: './projects/recruitment/src/app/module/config.module.ts',
  },
  shared: {
    '@angular/core': { singleton: true, eager: true },
    '@angular/common': { 
      eager: true, 
      requiredVersion: '15.2.6'
    },
    '@angular/router': { singleton: true, eager: true },
    '@ngxs/store': { singleton: true, eager: true },
    'shared-utils': { singleton: true, eager: true },
  },
}),

I have tried specifying the version

I also think that this is the cause of my other bug which I created a question for Angular micro-frontend with Webpack 5 module federation - *ngIf not removing HTML elements on interaction

0 Answers0