-
-
Notifications
You must be signed in to change notification settings - Fork 257
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 find module clients\node_modules\next\dist\compiled\lib\util\makeSerializable #2048
Comments
Same issue |
same issue. tried NEXT_PRIVATE_LOCAL_WEBPACK with true but still didn't work |
Facing the same issue even after adding NEXT_PRIVATE_LOCAL_WEBPACK = 'true'. |
same issue here |
Anyone found a fix ? |
facing same error |
try the latest verion of @module-federation/nextjs-mf@8.2.0 it is working for me https://www.npmjs.com/package/@module-federation/nextjs-mf/v/8.2.0 @vipulsharma144 @leonardmns12 @dilanbopanna @aminnoura @X3R02 @pabloLarios24 I also installed webpack and put NEXT_PRIVATE_LOCAL_WEBPACK in .env.app.local and .env file |
Can confirm on windows (git bash) it doesn't work ( What also worked was using the latest canary, which at the time of writing was tl;dr the issue for me is that in |
yarn patch the file if you cant find a way to make next see it. If you have a solution feel free to PR the readme with a note for other windows users |
My configurations in package.json
Check out this article: https://rafaelneto.dev/blog/configurar-variables-entorno-package-json-windows/ It worked for me on my windows system. |
same issue |
I have simple way to run command on window, check it out
|
Im on windows machine neither .env nor switching powershell/git bash seems to fix the problem, but
they both do the trick, thanks @VuongNQ |
work for me. Ubuntu 22.04, only use this line --> |
Warning Support for next is ending |
Describe the bug
When run the command "next dev", I got this error:
Error: Cannot find module 'C:\Users\user\Desktop\proyects\clients\node_modules\next\dist\compiled\lib\util\makeSerializable'
Require stack:
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at C:\Users\user\Desktop\proyects\clients\node_modules\next\dist\server\require-hook.js:55:36
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at mod.require (C:\Users\user\Desktop\proyects\clients\node_modules\next\dist\server\require-hook.js:65:28)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (C:\Users\user\Desktop\proyects\clients\node_modules@module-federation\enhanced\dist\src\lib\container\ContainerExposedDependency.js:8:26)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\Users\user\Desktop\proyects\clients\node_modules\@module-federation\enhanced\dist\src\lib\container\ContainerExposedDependency.js',
'C:\Users\user\Desktop\proyects\clients\node_modules\@module-federation\enhanced\dist\src\lib\container\ContainerEntryModule.js',
'C:\Users\user\Desktop\proyects\clients\node_modules\@module-federation\enhanced\dist\src\lib\container\HoistContainerReferencesPlugin.js',
'C:\Users\user\Desktop\proyects\clients\node_modules\@module-federation\enhanced\dist\src\wrapper\HoistContainerReferencesPlugin.js',
'C:\Users\user\Desktop\proyects\clients\node_modules\@module-federation\enhanced\dist\src\index.js',
'C:\Users\user\Desktop\proyects\clients\node_modules\@module-federation\nextjs-mf\dist\src\internal.js',
'C:\Users\user\Desktop\proyects\clients\node_modules\@module-federation\nextjs-mf\dist\src\plugins\NextFederationPlugin\next-fragments.js',
'C:\Users\user\Desktop\proyects\clients\node_modules\@module-federation\nextjs-mf\dist\src\plugins\NextFederationPlugin\index.js',
'C:\Users\user\Desktop\proyects\clients\node_modules\@module-federation\nextjs-mf\dist\src\index.js',
'C:\Users\user\Desktop\proyects\clients\next.config.js'
]
}
My next.config.js:
const { NextFederationPlugin } = require("@module-federation/nextjs-mf");
module.exports = {
webpack(config, options) {
if (!options.isServer) {
config.plugins.push(
new NextFederationPlugin({
name: "host",
remotes: {
remote: "remote@http://localhost:3001/remote.js",
},
filename: "static/chunks/remoteEntry.js",
})
);
}
},
};
Reproduction
Run command next dev
Used Package Manager
npm
System Info
Validations
The text was updated successfully, but these errors were encountered: