Skip to content

Native federation is giving bundle error like: [ERROR] Could not resolve "globalize/date", [ERROR] Could not resolve "@angular/localize/tools" #1095

@nlegncn

Description

@nlegncn

With what library do you have an issue?

native-federation

Reproduction of the bug/regression with instructions

While running "npm run start" angular 21 shell application it starting to give these errors with some packages:
✘ [ERROR] Could not resolve "@angular/localize/tools"

node_modules/@angular/build/src/utils/load-translations.js:77:212:
  77 │ ...nslationParser, } = await Promise.resolve().then(() => __importStar(require('@angular/localize/tools')));
     ╵      

✘ [ERROR] Could not resolve "globalize/date"

node_modules/devextreme/esm/__internal/core/localization/globalize/date.js:11:7:
  11 │ import "globalize/date";
     ╵        ~~~~~~~~~~~~~~~~

✘ [ERROR] No loader is configured for ".node" files: node_modules/@tailwindcss/oxide-win32-x64-msvc/tailwindcss-oxide.win32-x64-msvc.node

I really dont understand how can fix them

NOTE : end of the logs:

ERRR Error bundling shared npm package
ERRR Build failed with 20 errors:
node_modules/devextreme/esm/__internal/core/localization/globalize/core.js:16:22: ERROR: Could not resolve "globalize"
node_modules/devextreme/esm/__internal/core/localization/globalize/currency.js:12:7: ERROR: Could not resolve "globalize/currency"
node_modules/devextreme/esm/__internal/core/localization/globalize/currency.js:16:22: ERROR: Could not resolve "globalize"
node_modules/devextreme/esm/__internal/core/localization/globalize/date.js:11:7: ERROR: Could not resolve "globalize/date"
node_modules/devextreme/esm/__internal/core/localization/globalize/date.js:17:22: ERROR: Could not resolve "globalize"
...
ERRR For more information, run in verbose mode
NOTE
ERRR Build failed with 20 errors:
node_modules/devextreme/esm/__internal/core/localization/globalize/core.js:16:22: ERROR: Could not resolve "globalize"
node_modules/devextreme/esm/__internal/core/localization/globalize/currency.js:12:7: ERROR: Could not resolve "globalize/currency"
node_modules/devextreme/esm/__internal/core/localization/globalize/currency.js:16:22: ERROR: Could not resolve "globalize"
node_modules/devextreme/esm/__internal/core/localization/globalize/date.js:11:7: ERROR: Could not resolve "globalize/date"
node_modules/devextreme/esm/__internal/core/localization/globalize/date.js:17:22: ERROR: Could not resolve "globalize"

Expected behavior

These errors should not be occuured

Versions of Native/Module Federation, Angular, Node, Browser, and operating system

Native federation:
"@angular-architects/native-federation": "21.0.4",
"@angular/common": "21.2.6",
Node:22.20.0
OS: Windows

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions