Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot serve remotes in module federation project #28192

Closed
1 of 4 tasks
iancharlesdouglas opened this issue Sep 29, 2024 · 8 comments
Closed
1 of 4 tasks

Cannot serve remotes in module federation project #28192

iancharlesdouglas opened this issue Sep 29, 2024 · 8 comments

Comments

@iancharlesdouglas
Copy link

iancharlesdouglas commented Sep 29, 2024

Current Behavior

When following the steps on the Module Federation page for either Angular or React, building the static remotes fails with (excerpt):

> nx run cart:build:development

[ Module Federation Manifest Plugin ]: Manifest will use absolute path resolution via its host at runtime, reason: publicPath='auto'
node:fs:596
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open 'data:text/javascript;charset=utf-8;base64,
...
... (truncated)
...
 at Object.openSync (node:fs:596:3)
    at Object.writeFileSync (node:fs:2322:35)
    at FederationRuntimePlugin.ensureFile (/home/ian/dev/nx/iancharlesdouglas/node_modules/@module-federation/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts:206:10)
    at FederationRuntimePlugin.getDependency (/home/ian/dev/nx/iancharlesdouglas/node_modules/@module-federation/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts:222:10)
    at /home/ian/dev/nx/iancharlesdouglas/node_modules/@module-federation/enhanced/src/lib/container/ContainerPlugin.ts:201:43
    at Hook.eval [as callAsync] (eval at create (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:61:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/Hook.js:18:14)
    at /home/ian/dev/nx/iancharlesdouglas/node_modules/webpack/lib/Compiler.js:1323:20
    at Hook.eval [as callAsync] (eval at create (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/Hook.js:18:14) {

Expected Behavior

The project (the host and all remotes) are built successfully and served, and a browser instance opened as per the command

GitHub Repo

No response

Steps to Reproduce

  1. Follow the instructions on the Module Federation page listed above

Nx Report

Node           : 18.19.1
OS             : linux-x64
Native Target  : x86_64-linux
npm            : 9.2.0

nx (global)        : 19.3.1
nx                 : 19.8.2
@nx/js             : 19.8.2
@nx/jest           : 19.8.2
@nx/linter         : 19.8.2
@nx/eslint         : 19.8.2
@nx/workspace      : 19.8.2
@nx/devkit         : 19.8.2
@nx/eslint-plugin  : 19.8.2
@nx/react          : 19.8.2
@nrwl/tao          : 19.8.2
@nx/web            : 19.8.2
@nx/webpack        : 19.8.2
typescript         : 5.5.4

Failure Logs

NX   Running target build for 3 projects:

- shop
- cart
- about



> nx run cart:build:development

[ Module Federation Manifest Plugin ]: Manifest will use absolute path resolution via its host at runtime, reason: publicPath='auto'
node:fs:596
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open 'data:text/javascript;charset=utf-8;base64,aW1wb3J0IGZlZGVyYXRpb24gZnJvbSAnL2hvbWUvaWFuL2Rldi9ueC9pYW5jaGFybGVzZG91Z2xhcy9ub2RlX21vZHVsZXMvQG1vZHVsZS1mZWRlcmF0aW9uL3dlYnBhY2stYnVuZGxlci1ydW50aW1lL2Rpc3QvaW5kZXguY2pzLmpzJzsKaW1wb3J0IHBsdWdpbl8wIGZyb20gJy9ob21lL2lhbi9kZXYvbngvaWFuY2hhcmxlc2RvdWdsYXMvbm9kZV9tb2R1bGVzL0BueC93ZWJwYWNrL3NyYy91dGlscy9tb2R1bGUtZmVkZXJhdGlvbi9wbHVnaW5zL3J1bnRpbWUtbGlicmFyeS1jb250cm9sLnBsdWdpbi5qcyc7CmltcG9ydCBwbHVnaW5fMSBmcm9tICcvaG9tZS9pYW4vZGV2L254L2lhbmNoYXJsZX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pcmVfXy5mZWRlcmF0aW9uLmluaXRPcHRpb25zLnBsdWdpbnMgPSBfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uaW5pdE9wdGlvbnMucGx1Z2lucyA/IAoJX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLmluaXRPcHRpb25zLnBsdWdpbnMuY29uY2F0KHBsdWdpbnNUb0FkZCkgOiBwbHVnaW5zVG9BZGQ7CglfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uaW5zdGFuY2UgPSBfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24ucnVudGltZS5pbml0KF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pbml0T3B0aW9ucyk7CglpZihfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uYXR0YWNoU2hhcmVTY29wZU1hcCl7CgkJX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLmF0dGFjaFNoYXJlU2NvcGVNYXAoX193ZWJwYWNrX3JlcXVpcmVfXykKCX0KCWlmKF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pbnN0YWxsSW5pdGlhbENvbnN1bWVzKXsKCQlfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uaW5zdGFsbEluaXRpYWxDb25zdW1lcygpCgl9CgoJaWYoIV9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pc01GUmVtb3RlICYmIF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5wcmVmZXRjaCl7CglfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24ucHJlZmV0Y2goKQoJfQp9'
    at Object.openSync (node:fs:596:3)
    at Object.writeFileSync (node:fs:2322:35)
    at FederationRuntimePlugin.ensureFile (/home/ian/dev/nx/iancharlesdouglas/node_modules/@module-federation/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts:206:10)
    at FederationRuntimePlugin.getDependency (/home/ian/dev/nx/iancharlesdouglas/node_modules/@module-federation/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts:222:10)
    at /home/ian/dev/nx/iancharlesdouglas/node_modules/@module-federation/enhanced/src/lib/container/ContainerPlugin.ts:201:43
    at Hook.eval [as callAsync] (eval at create (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:61:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/Hook.js:18:14)
    at /home/ian/dev/nx/iancharlesdouglas/node_modules/webpack/lib/Compiler.js:1323:20
    at Hook.eval [as callAsync] (eval at create (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/Hook.js:18:14) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'data:text/javascript;charset=utf-8;base64,aW1wb3J0IGZlZGVyYXRpb24gZnJvbSAnL2hvbWUvaWFuL2Rldi9ueC9pYW5jaGFybGVzZG91Z2xhcy9ub2RlX21vZHVsZXMvQG1vZHVsZS1mZWRlcmF0aW9uL3dlYnBhY2stYnVuZGxlci1ydW50aW1lL2Rpc3QvaW5kZXguY2pzLmpzJzsKaW1wb3J0IHBsdWdpbl8wIGZyb20gJy9ob21lL2lhbi9kZXYvbngvaWFuY2hhcmxlc2RvdWdsYXMvbm9kZV9tb2R1bGVzL0BueC93ZWJwYWNrL3NyYy91dGlscy9tb2R1bGUtZmVkZXJhdGlvbi9wbHVnaW5zL3J1bnRpbWUtbGlicmFyeS1jb250cm9sLnBsdWdpbi5qcyc7CmltcG9ydCBwbHVnaW5fMSBmcm9tICcvaG9tZS9pYW4vZGV2L254L2lhbmNoYXJsZXNkb3VnbGFzL25vZG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F0aW9uLmluaXRPcHRpb25zLnBsdWdpbnMgPSBfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uaW5pdE9wdGlvbnMucGx1Z2lucyA/IAoJX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLmluaXRPcHRpb25zLnBsdWdpbnMuY29uY2F0KHBsdWdpbnNUb0FkZCkgOiBwbHVnaW5zVG9BZGQ7CglfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uaW5zdGFuY2UgPSBfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24ucnVudGltZS5pbml0KF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pbml0T3B0aW9ucyk7CglpZihfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uYXR0YWNoU2hhcmVTY29wZU1hcCl7CgkJX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLmF0dGFjaFNoYXJlU2NvcGVNYXAoX193ZWJwYWNrX3JlcXVpcmVfXykKCX0KCWlmKF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pbnN0YWxsSW5pdGlhbENvbnN1bWVzKXsKCQlfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uaW5zdGFsbEluaXRpYWxDb25zdW1lcygpCgl9CgoJaWYoIV9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pc01GUmVtb3RlICYmIF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5wcmVmZXRjaCl7CglfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24ucHJlZmV0Y2goKQoJfQp9'
}

Node.js v18.19.1

> nx run about:build:development

[ Module Federation Manifest Plugin ]: Manifest will use absolute path resolution via its host at runtime, reason: publicPath='auto'
node:fs:596
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open 'data:text/javascript;charset=utf-8;base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F1aXJlX18uZmVkZXJhdGlvbi5pbnN0YWxsSW5pdGlhbENvbnN1bWVzKXsKCQlfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uaW5zdGFsbEluaXRpYWxDb25zdW1lcygpCgl9CgoJaWYoIV9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pc01GUmVtb3RlICYmIF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5wcmVmZXRjaCl7CglfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24ucHJlZmV0Y2goKQoJfQp9'
    at Object.openSync (node:fs:596:3)
    at Object.writeFileSync (node:fs:2322:35)
    at FederationRuntimePlugin.ensureFile (/home/ian/dev/nx/iancharlesdouglas/node_modules/@module-federation/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts:206:10)
    at FederationRuntimePlugin.getDependency (/home/ian/dev/nx/iancharlesdouglas/node_modules/@module-federation/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts:222:10)
    at /home/ian/dev/nx/iancharlesdouglas/node_modules/@module-federation/enhanced/src/lib/container/ContainerPlugin.ts:201:43
    at Hook.eval [as callAsync] (eval at create (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:61:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/Hook.js:18:14)
    at /home/ian/dev/nx/iancharlesdouglas/node_modules/webpack/lib/Compiler.js:1323:20
    at Hook.eval [as callAsync] (eval at create (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/Hook.js:18:14) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'data:text/javascript;charset=utf-8;base64,aW1wb3J0IGZlZ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JhdGlvbi5pbnN0YWxsSW5pdGlhbENvbnN1bWVzKXsKCQlfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uaW5zdGFsbEluaXRpYWxDb25zdW1lcygpCgl9CgoJaWYoIV9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pc01GUmVtb3RlICYmIF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5wcmVmZXRjaCl7CglfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24ucHJlZmV0Y2goKQoJfQp9'
}

Node.js v18.19.1

> nx run shop:build:development

[ Module Federation Manifest Plugin ]: Manifest will use absolute path resolution via its host at runtime, reason: publicPath='auto'
node:fs:596
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open 'data:text/javascript;charset=utf-8;base64,aW1wb3J0IGZlZGVyYXRpb24gZnJvbSAnL2hvbWUvaWFuL2Rldi9ueC9pYW5jaGFybGVzZG91Z2xhcy9ub2RlX21vZHVsZXMvQG1vZHVsZS1mZWRlcmF0aW9uL3dlYnBhY2stYnVuZGxlci1ydW50aW1lL2Rpc3QvaW5kZXguY2pzLmpzJzsKaW1wb3J0IHBsdWdpbl8wIGZyb20gJy9ob21lL2lhbi9kZXYvbngvaWFuY2hhcmxlc2RvdWdsYXMvbm9kZV9tb2R1bGVzL0BueC93ZWJwYWNrL3NyYy91dGlscy9tb2R1bGUtZmVkZXJhdGlvbi9wbHVnaW5zL3J1bnRpbWUtbGlicmFyeS1jb250cm9sLnBsdWdpbi5qcyc7CmltcG9ydCBwbHVnaW5fMSBmcm9tICcvaG9tZS9pYW4vZGV2L254L2lhbmNoYXJsZXNkb3VnbGFzL25vZGVfbW9kdWxlcy9AbW9kdWxlLWZlZGVyYXRpb24vZGF0YS1wcmVmZXRjaC9kaXN0L3BsdWdpbi5lc20uanMnOwppbXBvcnQgcGx1Z2luXzIgZnJvbSAnL2hvbWUvaWFuL2Rldi9ueC9pYW5jaGFyb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W9uLmluaXRPcHRpb25zLnBsdWdpbnMuY29uY2F0KHBsdWdpbnNUb0FkZCkgOiBwbHVnaW5zVG9BZGQ7CglfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uaW5zdGFuY2UgPSBfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24ucnVudGltZS5pbml0KF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pbml0T3B0aW9ucyk7CglpZihfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uYXR0YWNoU2hhcmVTY29wZU1hcCl7CgkJX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLmF0dGFjaFNoYXJlU2NvcGVNYXAoX193ZWJwYWNrX3JlcXVpcmVfXykKCX0KCWlmKF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pbnN0YWxsSW5pdGlhbENvbnN1bWVzKXsKCQlfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uaW5zdGFsbEluaXRpYWxDb25zdW1lcygpCgl9CgoJaWYoIV9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pc01GUmVtb3RlICYmIF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5wcmVmZXRjaCl7CglfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24ucHJlZmV0Y2goKQoJfQp9'
    at Object.openSync (node:fs:596:3)
    at Object.writeFileSync (node:fs:2322:35)
    at FederationRuntimePlugin.ensureFile (/home/ian/dev/nx/iancharlesdouglas/node_modules/@module-federation/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts:206:10)
    at FederationRuntimePlugin.getDependency (/home/ian/dev/nx/iancharlesdouglas/node_modules/@module-federation/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts:222:10)
    at /home/ian/dev/nx/iancharlesdouglas/node_modules/@module-federation/enhanced/src/lib/container/ContainerPlugin.ts:201:43
    at Hook.eval [as callAsync] (eval at create (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:61:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/Hook.js:18:14)
    at /home/ian/dev/nx/iancharlesdouglas/node_modules/webpack/lib/Compiler.js:1323:20
    at Hook.eval [as callAsync] (eval at create (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/ian/dev/nx/iancharlesdouglas/node_modules/tapable/lib/Hook.js:18:14) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'data:text/javascript;charset=utf-8;base64,aW1wb3J0IGZlZGVyYXRpb24gZnJvbSAnL2hvbWUvaWFuL2Rldi9ueC9pYW5jaGFybGVzZG91Z2xhcy9ub2RlX21vZHVsZXMvQG1vZHVsZS1mZWRlcmF0aW9uL3dlYnBhY2stYnVuZGxlci1ydW50aW1lL2Rpc3QvaW5kZXguY2pzLmpzJzsKaW1wb3J0IHBsdWdpbl8wIGZyb20gJy9ob21lL2lhbi9kZXYvbngvaWFuY2hhcmxlc2RvdWdsYXMvbm9kZV9tb2R1bGVzL0BueC93ZWJwYWNrL3NyYy91dGlscy9tb2R1bGUtZmVkZXJhdGlvbi9wbHVnaW5zL3J1bnRpbWUtbGlicmFyeS1jb250cm9sLnBsdWdpbi5qcyc7CmltcG9ydCBwbHVnaW5fMSBmcm9tICcvaG9tZS9pYW4vZGV2L254L2lhbmNoYXJsZXNkb3VnbGFzL25vZGVfbW9kdWxlcy9AbW9kdWxlLWZlZGVyYXRpb24vZGF0YS1wcmVmZXRjaC9kaXN0L3BsdWdpbi5lc20uanMnOwppbXBvcnQgcGx1Z2luXzIgZnJvbSAnL2hvbWUvaWFuL2Rldi9ueC9pYW5jaGFybGVzZG91Z2xhcy9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25zLnBsdWdpbnMuY29uY2F0KHBsdWdpbnNUb0FkZCkgOiBwbHVnaW5zVG9BZGQ7CglfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uaW5zdGFuY2UgPSBfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24ucnVudGltZS5pbml0KF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pbml0T3B0aW9ucyk7CglpZihfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uYXR0YWNoU2hhcmVTY29wZU1hcCl7CgkJX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLmF0dGFjaFNoYXJlU2NvcGVNYXAoX193ZWJwYWNrX3JlcXVpcmVfXykKCX0KCWlmKF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pbnN0YWxsSW5pdGlhbENvbnN1bWVzKXsKCQlfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uaW5zdGFsbEluaXRpYWxDb25zdW1lcygpCgl9CgoJaWYoIV9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pc01GUmVtb3RlICYmIF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5wcmVmZXRjaCl7CglfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24ucHJlZmV0Y2goKQoJfQp9'
}

Node.js v18.19.1



 NX   Running target build for 3 projects failed

Failed tasks:

- cart:build:development
- about:build:development
- shop:build:development

Package Manager Version

npm 9.2.0

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@jmajnek
Copy link

jmajnek commented Sep 30, 2024

I encountered the same issue when using Node.js ^18.19.x.
When I use Node.js ^22.9.x, I get #28195.

I was able to work around the issue by installing @module-federation/[email protected].

@WolfSoko
Copy link

WolfSoko commented Sep 30, 2024

@SombreroElGringo
Copy link

SombreroElGringo commented Sep 30, 2024

Not the exact same issue, but I guess it is maybe related. When I tried to generate a new workspace with latest nx version (19.8.2), then generate a host and remote project via nx g @nx/react:host host --remotes=shop and try to serve the remote I got the following error:

yarn run nx run shop:serve
yarn run v1.22.22
$ /Users/root/Desktop/monorepo/node_modules/.bin/nx run shop:serve

> nx run shop:serve:development


 NX  Starting module federation dev-server for shop with 0 remotes


 NX  Starting static remotes proxies...


 NX  Static remotes proxies started successfully

[ Module Federation Manifest Plugin ]: Manifest will use absolute path resolution via its host at runtime, reason: publicPath='auto'
node:fs:2368
    return binding.writeFileUtf8(
                   ^

Error: ENAMETOOLONG: name too long, open 'data:text/javascript;charset=utf-8;base64,aW1wb3J0IGZlZGVyYXRpb24gZnJvbSAnL1VzZXJzL2Zsb3JlbnQucGFpbGhlcy9EZXNrdG9wL21vbm9yZXBvL25vZGVfbW9kdWxlcy9AbW9kdWxlLWZlZGVyYXRpb24vd2VicGFjay1idW5kbGVyLXJ1bnRpbWUvZGlzdC9pbmRleC5janMuanMnOwppbXBvcnQgcGx1Z2luXzAgZnJvbSAnL1VzZXJzL2Zsb3JlbnQucGFpbGhlcy9EZXNrdG9wL21vbm9yZXBvL25vZGVfbW9kdWxlcy9Abngvd2VicGFjay9zcmMvdXRpbHMvbW9kdWxlLWZlZGVyYXRpb24vcGx1Z2lucy9ydW50aW1lLWxpYnJhcnktY29udHJvbC5wbHVnaW4uanMnOwppbXBvcnQgcGx1Z2luXzEgZnJvbSAnL1VzZXJzL2Zsb3JlbnQucGFpbGhlcy9EZXNrdG9wL21vbm9yZXBvL25vZGVfbW9kdWxlcy9AbW9kdWxlLWZlZGVyYXRpb24vZGF0YS1wcmVmZXRjaC9kaXN0L3BsdWdpbi5lc20uanMnOwppbXBvcnQgcGx1Z2luXzIgZnJvbSAnL1VzZXJzL2Zsb3JlbnQucGFpbGhlcy9EZXNrdG9wL21vbm9yZXBvL25vZGVfbW9kdWxlcy9AbW9kdWxlLWZlZGVyYXRpb24vZGF0YS1wcmVmZXRjaC9kaXN0L3NoYXJlZ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ZXJhdGlvbi5pbnN0YW5jZSA9IF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5ydW50aW1lLmluaXQoX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLmluaXRPcHRpb25zKTsKCWlmKF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5hdHRhY2hTaGFyZVNjb3BlTWFwKXsKCQlfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uYXR0YWNoU2hhcmVTY29wZU1hcChfX3dlYnBhY2tfcmVxdWlyZV9fKQoJfQoJaWYoX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLmluc3RhbGxJbml0aWFsQ29uc3VtZXMpewoJCV9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pbnN0YWxsSW5pdGlhbENvbnN1bWVzKCkKCX0KCglpZighX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLmlzTUZSZW1vdGUgJiYgX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLnByZWZldGNoKXsKCV9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5wcmVmZXRjaCgpCgl9Cn0='
    at Object.writeFileSync (node:fs:2368:20)
    at FederationRuntimePlugin.ensureFile (/Users/root/Desktop/monorepo/node_modules/@module-federation/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts:206:10)
    at FederationRuntimePlugin.getDependency (/Users/root/Desktop/monorepo/node_modules/@module-federation/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts:222:10)
    at /Users/root/Desktop/monorepo/node_modules/@module-federation/enhanced/src/lib/container/ContainerPlugin.ts:201:43
    at Hook.eval [as callAsync] (eval at create (/Users/root/Desktop/monorepo/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:73:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/root/Desktop/monorepo/node_modules/tapable/lib/Hook.js:18:14)
    at /Users/root/Desktop/monorepo/node_modules/webpack/lib/Compiler.js:1323:20
    at Hook.eval [as callAsync] (eval at create (/Users/root/Desktop/monorepo/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/root/Desktop/monorepo/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.compile (/Users/root/Desktop/monorepo/node_modules/webpack/lib/Compiler.js:1313:28) {
  errno: -63,
  code: 'ENAMETOOLONG',
  syscall: 'open',
  path: 'data:text/javascript;charset=utf-8;base64,aW1wb3J0IGZlZGVyYXRpb24gZnJvbSAnL1VzZXJzL2Zsb3JlbnQucGFpbGhlcy9EZXNrdG9wL21vbm9yZXBvL25vZGVfbW9kdWxlcy9AbW9kdWxlLWZlZGVyYXRpb24vd2VicGFjay1idW5kbGVyLXJ1bnRpbWUvZGlzdC9pbmRleC5janMuanMnOwppbXBvcnQgcGx1Z2luXzAgZnJvbSAnL1VzZXJzL2Zsb3JlbnQucGFpbGhlcy9EZXNrdG9wL21vbm9yZXBvL25vZGVfbW9kdWxlcy9Abngvd2VicGFjay9zcmMvdXRpbHMvbW9kdWxlLWZlZGVyYXRpb24vcGx1Z2lucy9ydW50aW1lLWxpYnJhcnktY29udHJvbC5wbHVnaW4uanMnOwppbXBvcnQgcGx1Z2luXzEgZnJvbSAnL1VzZXJzL2Zsb3JlbnQucGFpbGhlcy9EZXNrdG9wL21vbm9yZXBvL25vZGVfbW9kdWxlcy9AbW9kdWxlLWZlZGVyYXRpb24vZGF0YS1wcmVmZXRjaC9kaXN0L3BsdWdpbi5lc20uanMnOwppbXBvcnQgcGx1Z2luXzIgZnJvbSAnL1VzZXJzL2Zsb3JlbnQucGFpbGhlcy9EZXNrdG9wL21vbm9yZXBvL25vZGVfbW9kdWxlcy9AbW9kdWxlLWZlZGVyYXRpb24vZGF0YS1wcmVmZXRjaC9kaXN0L3NoYXJlZC5lc20uanMnOwoKaWYoIV9fd2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9IF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5ydW50aW1lLmluaXQoX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLmluaXRPcHRpb25zKTsKCWlmKF9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5hdHRhY2hTaGFyZVNjb3BlTWFwKXsKCQlfX3dlYnBhY2tfcmVxdWlyZV9fLmZlZGVyYXRpb24uYXR0YWNoU2hhcmVTY29wZU1hcChfX3dlYnBhY2tfcmVxdWlyZV9fKQoJfQoJaWYoX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLmluc3RhbGxJbml0aWFsQ29uc3VtZXMpewoJCV9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5pbnN0YWxsSW5pdGlhbENvbnN1bWVzKCkKCX0KCglpZighX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLmlzTUZSZW1vdGUgJiYgX193ZWJwYWNrX3JlcXVpcmVfXy5mZWRlcmF0aW9uLnByZWZldGNoKXsKCV9fd2VicGFja19yZXF1aXJlX18uZmVkZXJhdGlvbi5wcmVmZXRjaCgpCgl9Cn0='
}

Node.js v20.17.0

@iancharlesdouglas
Copy link
Author

I encountered the same issue when using Node.js ^18.19.x. When I use Node.js ^22.9.x, I get #28195.

I was able to work around the issue by installing @module-federation/[email protected].

This worked, thanks a million!

@MarcusKaseder
Copy link

MarcusKaseder commented Sep 30, 2024

I had the same issue and installing @module-federation/[email protected] worked for ng serve.

While on windows everything is fine and builds, the nx build succeeds for host projects but fails for remote projects (same error) on linux.

The current way to get the build working again was to reduce the @nx/angular package down to 19.5.7 (@nx/[email protected]).

@Coly010
Copy link
Contributor

Coly010 commented Oct 1, 2024

Yes, Module Federation Enhanced released a new version with a bug in it and therefore I pinned the version yesterday until the issue is ironed out on MF side.
#28196

@ScriptedAlchemy
Copy link
Contributor

hi all.
canary version 0.0.0-next-20241002194835 should have the fix in it - i have also added an additional test case to my repo that replicates how nx uses the plugin to avoid it slipping past again

Copy link

github-actions bot commented Nov 3, 2024

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants