-
-
Notifications
You must be signed in to change notification settings - Fork 372
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Describe the bug
I spent 3 hours figuring out why your example https://github.com/module-federation/module-federation-examples/blob/master/nextjs-v14 worked and my project didn't
I removed files one by one, making smaller and smaller changes, I though problem was in bun, in node modules cache, in next.js versions difference, until eventually I was left with two identical projects (I even changed .tsx to .js) but in one directory it worked and it another it didn't
Turns out, if I add spaces to the path where project is and where I'm running it, it will fail to compile throwing this long error:
HookWebpackError: Unterminated string in JSON at position 78
at makeWebpackError (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/webpack/lib/HookWebpackError.js:48:9)
at /Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/webpack/lib/Compilation.js:3181:12
at eval (eval at create (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:30:1)
-- inner error --
SyntaxError: Unterminated string in JSON at position 78
at JSON.parse (<anonymous>)
at ModuleHandler._handleContainerModule (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1079:22)
at /Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1138:31
at Array.forEach (<anonymous>)
at ModuleHandler.collect (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1127:31)
at /Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1682:72
at step (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1402:23)
at Object.next (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1343:20)
at asyncGeneratorStep$1 (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1165:28)
at _next (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1183:17)
caused by plugins in Compilation.hooks.processAssets
SyntaxError: Unterminated string in JSON at position 78
at JSON.parse (<anonymous>)
at ModuleHandler._handleContainerModule (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1079:22)
at /Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1138:31
at Array.forEach (<anonymous>)
at ModuleHandler.collect (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1127:31)
at /Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1682:72
at step (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1402:23)
at Object.next (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1343:20)
at asyncGeneratorStep$1 (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1165:28)
at _next (/Users/hloth/Downloads/module-federation-examples/files fuck me/node_modules/@module-federation/manifest/dist/index.cjs.js:1183:17)
Reproduction
https://github.com/module-federation/module-federation-examples/blob/master/nextjs-v14
Used Package Manager
npm
System Info
N/AValidations
- 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.
jordankimsey