-
-
Notifications
You must be signed in to change notification settings - Fork 388
Open
Description
Describe the bug
The ESM entrypoint for @module-federation/rsbuild-plugin imports a .json file without an accompanying import attribute, which causes Node.js to crash with the following error:
node:internal/modules/esm/assert:88
throw new ERR_IMPORT_ATTRIBUTE_MISSING(url, 'type', validType);
^
TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module "file:///.../node_modules/@module-federation/rsbuild-plugin/package.json" needs an import attribute of "type: json"
at validateAttributes (node:internal/modules/esm/assert:88:15)
at defaultLoad (node:internal/modules/esm/load:132:3)
at async ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:483:32) {
code: 'ERR_IMPORT_ATTRIBUTE_MISSING'
}
I believe this was likely introduced by #4351
Reproduction
Attempt to execute a module with contents: import '@module-federation/rsbuild-plugin'; on a modern version of Node.js
Used Package Manager
npm
System Info
Node.js v22.12.0Validations
- Read the docs.
- Read the common issues list.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Module federation issue and not a framework-specific issue.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels