For AI agents: the complete documentation index is available at https://mfdoctor.kevinbeier.com/llms.txt, the full documentation bundle is available at https://mfdoctor.kevinbeier.com/llms-full.txt, and this page is available as Markdown at https://mfdoctor.kevinbeier.com/rules/shared/subpath-version-unresolved.md.

shared/subpath-version-unresolved

  • Category: correctness
  • Default severity: error

Issue

On Vite, prefix and package-subpath shared keys inherit provider version from the parent package. When that resolution fails, the shared entry ships with version: undefined, which breaks singleton / requiredVersion matching and can crash remotes that expect the host to provide the share.

How to fix it

Set an explicit version (or a concrete requiredVersion such as "^19.1.0") on the prefix/subpath shared key, or ensure the parent package is installed so @module-federation/vite can inherit its version. Non-Vite adapters are out of scope for this rule.

Suppress or retarget with rules["shared/subpath-version-unresolved"] set to "off" or a severity — see Suppressions and allowlists.

Sources