Skip to content

[enhanced] tapable is not a direct dependency #3451

Open
@rrosenshain-sc

Description

@rrosenshain-sc

Describe the bug

ModuleFederationPlugin is directly pulling tapable but it doesn't have a direct dependency on it.
https://github.com/module-federation/core/blob/main/packages/enhanced/src/lib/container/runtime/FederationModulesPlugin.ts#L7

The plugin has a peer on Webpack, but due to how pnpm works it can't find it in my setup.

I tried making a PR but changeset wants to make it a major version which it shouldn't be so I gave up.

I'm using @module-federation/[email protected].

I think this is manifesting in my repo because I have a common build package which all apps are importing and there's some sort of collision of webpack versions due to how peers are treated with pnpm.

[webpackCompiler]: Webpack compiler encountered a fatal error. Error: Cannot find module 'tapable'
Require stack:
- node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]__e2dpczkafrj7mlrvqcekj4zbfq/node_modules/@module-federation/enhanced/dist/src/lib/container/runtime/FederationModulesPlugin.js
- node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]__e2dpczkafrj7mlrvqcekj4zbfq/node_modules/@module-federation/enhanced/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.js
- node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]__e2dpczkafrj7mlrvqcekj4zbfq/node_modules/@module-federation/enhanced/dist/src/lib/container/runtime/FederationRuntimePlugin.js
- node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]__e2dpczkafrj7mlrvqcekj4zbfq/node_modules/@module-federation/enhanced/dist/src/lib/sharing/ConsumeSharedPlugin.js
- node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]__e2dpczkafrj7mlrvqcekj4zbfq/node_modules/@module-federation/enhanced/dist/src/lib/sharing/SharePlugin.js
- node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]__e2dpczkafrj7mlrvqcekj4zbfq/node_modules/@module-federation/enhanced/dist/src/lib/container/ModuleFederationPlugin.js
- node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]__e2dpczkafrj7mlrvqcekj4zbfq/node_modules/@module-federation/enhanced/dist/src/wrapper/ModuleFederationPlugin.js
- node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]__e2dpczkafrj7mlrvqcekj4zbfq/node_modules/@module-federation/enhanced/dist/src/index.js
- shared/build/src/moduleFederation/generateMFPluginConfig.js
- client/compile/plugins.js
- client/compile/config/webpack.config.babel.js
- client/webpack.config.babel.js
- client/compile/compile.js

Reproduction

Will provide later if needed

Used Package Manager

pnpm

System Info

N/A

Validations

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions