question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular MFE No version specified and unable to determine one

See original GitHub issue

Current Behavior

When building a host in our application after running nx g @nrwl/angular:setup-mfe we are getting the following warnings in the console.

shared module firebase/app -> /Users/jaybell/WebstormProjects/trellis-mono4/node_modules/firebase/app/dist/index.esm.js - Warning: No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file, or manually specify version in shared config.

shared module firebase/auth -> /Users/jaybell/WebstormProjects/trellis-mono4/node_modules/firebase/auth/dist/index.esm.js - Warning: No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file, or manually specify version in shared config.

shared module firebase/app-check -> /Users/jaybell/WebstormProjects/trellis-mono4/node_modules/firebase/app-check/dist/index.esm.js - Warning: No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file, or manually specify version in shared config.

shared module firebase/remote-config -> /Users/jaybell/WebstormProjects/trellis-mono4/node_modules/firebase/remote-config/dist/index.esm.js - Warning: No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file, or manually specify version in shared config.

shared module firebase/messaging -> /Users/jaybell/WebstormProjects/trellis-mono4/node_modules/firebase/messaging/dist/index.esm.js - Warning: No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file, or manually specify version in shared config.

shared module firebase/analytics -> /Users/jaybell/WebstormProjects/trellis-mono4/node_modules/firebase/analytics/dist/index.esm.js - Warning: No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file, or manually specify version in shared config.

shared module @apollo/client/utilities -> /Users/jaybell/WebstormProjects/trellis-mono4/node_modules/@apollo/client/utilities/index.js - Warning: No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file, or manually specify version in shared config.

shared module @apollo/client/core -> /Users/jaybell/WebstormProjects/trellis-mono4/node_modules/@apollo/client/core/index.js - Warning: No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file, or manually specify version in shared config.

shared module @apollo/client/link/batch -> /Users/jaybell/WebstormProjects/trellis-mono4/node_modules/@apollo/client/link/batch/index.js - Warning: No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file, or manually specify version in shared config.

shared module @apollo/client/link/subscriptions -> /Users/jaybell/WebstormProjects/trellis-mono4/node_modules/@apollo/client/link/subscriptions/index.js - Warning: No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file, or manually specify version in shared config.

Each of the secondary entry points have a package.json that does not have a version in it, even though the root packages package.json does.

For example node_modules/@apollo/client/core/package.json does not have a version but node_modules/@apollo/package.json does.

image

image

This does not seem to be a warning from Nx but rather from webpack instead has Nx is correctly collecting the secondary entry points and their version as can be seen from the calculated shared libs here:

"@apollo/client": {
    "singleton": true,
    "strictVersion": true,
    "requiredVersion": "^3.6.0"
  },
  "@apollo/client/cache": {
    "singleton": true,
    "strictVersion": true,
    "requiredVersion": "^3.6.0"
  },
  "@apollo/client/core": {
    "singleton": true,
    "strictVersion": true,
    "requiredVersion": "^3.6.0"
  },
  "@apollo/client/errors": {
    "singleton": true,
    "strictVersion": true,
    "requiredVersion": "^3.6.0"
  },
  "@apollo/client/link/batch": {
    "singleton": true,
    "strictVersion": true,
    "requiredVersion": "^3.6.0"
  },
  "@apollo/client/link/batch-http": {
    "singleton": true,
    "strictVersion": true,
    "requiredVersion": "^3.6.0"
  },
/// etc

Note this is only true for @apollo/client/* from my error logs, firebase does not seem to be shared at all for some reason. I print the entire sharedLibraries out and firebase does not exist in the shared libs. We do not use firebase directly, instead we are using AngularFire which would then use firebase internally. do I need to configure firebase as an additonal shared dep or should Nx see that AngularFire depends on firebase and then share it automatically?

Expected Behavior

MFE tooling should correctly share the packages

Steps to Reproduce

This issue may not be prioritized if details are not provided to help us reproduce the issue.

Failure Logs

See above

Environment

 NX   Report complete - copy this into the issue template

   Node : 14.19.0
   OS   : darwin x64
   yarn : 1.22.18
   
   nx : 14.1.7
   @nrwl/angular : 14.1.7
   @nrwl/cypress : 14.1.7
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.1.7
   @nrwl/eslint-plugin-nx : 14.1.7
   @nrwl/express : 14.1.7
   @nrwl/jest : 14.1.7
   @nrwl/js : 14.1.7
   @nrwl/linter : 14.1.7
   @nrwl/nest : 14.1.7
   @nrwl/next : Not Found
   @nrwl/node : 14.1.7
   @nrwl/nx-cloud : 14.0.3
   @nrwl/nx-plugin : 14.1.7
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : 14.1.7
   @nrwl/web : 14.1.7
   @nrwl/workspace : 14.1.7
   typescript : 4.6.3
   rxjs : 7.4.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
yharaskrikcommented, May 24, 2022

Adding this also does not solve the issue so I believe it is an outside of Nx issue, not sure what we can do about it since it seems webpack just isn’t happy that the package.jsons don’t have a version

image

0reactions
cougdoblecommented, Dec 22, 2022

@nhhockeyplayer did you have to make any changes to the config of your remotes or only in the host to get luxon working? I’m having a very similar looking issue with luxon, but your suggestion doesn’t appear to be working for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pitfalls with Module Federation and Angular
"No required version specified" and Secondary Entry Points ... No required version specified and unable to automatically determine one.
Read more >
reactjs - Luxon error - "No version specified and unable to ...
I am using webpack with react and module federation and share components between. But one of the dependency packages gives warning/error ...
Read more >
Issue with Angular Module Federation and okta-auth-js
No version specified and unable to automatically determine one. No version in description file (usually package.json).
Read more >
@angular-architects/module-federation - npm
If you get the warning No required version specified and unable to automatically determine one, Module Federation needs some help with finding ......
Read more >
Micro Frontends with Angular, Module Federation, and Auth0
Accordingly, we need to find a way to make all our micro frontends appear as one (single page) application. Very often, this involves ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found