Comments (10)
@parag3638 , Remove the NEXT_PRIVATE_LOCAL_WEBPACK = true from the dev and build scripts in the package.json file. Instead, create a .env file and add the NEXT_PRIVATE_LOCAL_WEBPACK = true
from module-federation-examples.
@parag3638 , I am also getting the same error. Please check this issue #3621
from module-federation-examples.
NEXT_PRIVATE_LOCAL_WEBPACK=true next dev
from module-federation-examples.
@sathishkumar555 It worked but now I am stuck with this....
Error: Cannot find module 'C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules\next\dist\compiled\lib\util\makeSerializable'
Require stack:
- C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules@module-federation\enhanced\dist\src\lib\container\ContainerExposedDependency.js
- C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules@module-federation\enhanced\dist\src\lib\container\ContainerEntryModule.js
- C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules@module-federation\enhanced\dist\src\lib\container\HoistContainerReferencesPlugin.js
- C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules@module-federation\enhanced\dist\src\wrapper\HoistContainerReferencesPlugin.js
- C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules@module-federation\enhanced\dist\src\index.js
- C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules@module-federation\nextjs-mf\dist\src\internal.js
- C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules@module-federation\nextjs-mf\dist\src\plugins\NextFederationPlugin\next-fragments.js
- C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules@module-federation\nextjs-mf\dist\src\plugins\NextFederationPlugin\index.js
- C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules@module-federation\nextjs-mf\dist\src\index.js
- C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\next.config.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules\next\dist\server\require-hook.js:55:36
at Module._load (node:internal/modules/cjs/loader:985:27)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at mod.require (C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules\next\dist\server\require-hook.js:65:28)
at require (node:internal/modules/helpers:176:18)
at Object. (C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules@module-federation\enhanced\dist\src\lib\container\ContainerExposedDependency.js:8:26)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules\@module-federation\enhanced\dist\src\lib\container\ContainerExposedDependency.js',
'C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules\@module-federation\enhanced\dist\src\lib\container\ContainerEntryModule.js',
'C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules\@module-federation\enhanced\dist\src\lib\container\HoistContainerReferencesPlugin.js',
'C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules\@module-federation\enhanced\dist\src\wrapper\HoistContainerReferencesPlugin.js',
'C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules\@module-federation\enhanced\dist\src\index.js',
'C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules\@module-federation\nextjs-mf\dist\src\internal.js',
'C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules\@module-federation\nextjs-mf\dist\src\plugins\NextFederationPlugin\next-fragments.js',
'C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules\@module-federation\nextjs-mf\dist\src\plugins\NextFederationPlugin\index.js',
'C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\node_modules\@module-federation\nextjs-mf\dist\src\index.js',
'C:\Users\H532304.GLOBAL\Desktop\ABC\test\remote\next.config.js'
]
}
from module-federation-examples.
Same error with next v14. Help!
from module-federation-examples.
put it in both .env and on the command line.
Otherwise file git issue with vercel.
from module-federation-examples.
put it in both .env and on the command line.
Otherwise file git issue with vercel.
where should i add this
in next.js there is no such file cale called webpack.js
from module-federation-examples.
![Screenshot 2024-04-25 114747](https://private-user-images.githubusercontent.com/97902653/325494883-c341757e-8302-40b3-8433-d1059197c63a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTY2MjU1NDIsIm5iZiI6MTcxNjYyNTI0MiwicGF0aCI6Ii85NzkwMjY1My8zMjU0OTQ4ODMtYzM0MTc1N2UtODMwMi00MGIzLTg0MzMtZDEwNTkxOTdjNjNhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTI1VDA4MjA0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI4NGY2ZDkyYTlhNmQyYWE3ZDMyZTNlZjM3ZTg2ZDVlNjI5ZmFhNWNjYWY1Y2ZlZjVlOGQ4Njg1ZGQ5YjI2MjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vU_SU1eljQItTqOpbEyk-wv3W6T8evQ41fY8am8OxUA)
error still showing
NEXT_PRIVATE_LOCAL_WEBPACK=true next dev
from module-federation-examples.
I have the same problem, I comment what I have done to see if they can help me.
Create both Home and Reomte project with NextJS 14 + Typescript + App Router (/src/app/page.tsx)
I made the configuration indicated in this article: https://medium.com/@sarathdixit29/implementing-module-federation-in-next-js-with-typescript-and-eslint-ba6627a0686f
If I run it like this: npm run dev it gives me the same error as the friend who started this thread.
If I change the next.config.mjs file and pass it to anext.config.js and adjust the content as the article says and execute it and now I get this error:
npm run dev
[email protected] dev
next dev -p 3001
(node:25736) [DEP0040] DeprecationWarning: The punycode
module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ...
to show where the warning was created)
▲Next.js 14.2.3
- Local: http://localhost:3001
- Environments: .env
✓ Starting...
(node:8476) [DEP0040] DeprecationWarning: The punycode
module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ...
to show where the warning was created)
Error: App Directory is not supported by nextjs-mf. Use only pages directory, do not open git issues about this
at NextFederationPlugin.validateOptions (D:\Dev\workspace\ws-mentor-it\nextjs\module-federation\remote-app\node_modules@module-federation\nextjs-mf\dist\src\plugins\NextFederationPlugin\index.js :67:23)
at NextFederationPlugin.apply (D:\Dev\workspace\ws-mentor-it\nextjs\module-federation\remote-app\node_modules@module-federation\nextjs-mf\dist\src\plugins\NextFederationPlugin\index.js :45:19)
at createCompiler (D:\Dev\workspace\ws-mentor-it\nextjs\module-federation\remote-app\node_modules\next\dist\compiled\webpack\bundle5.js:28:1467450)
at D:\Dev\workspace\ws-mentor-it\nextjs\module-federation\remote-app\node_modules\next\dist\compiled\webpack\bundle5.js:28:1467068
at Array.map ()
at createMultiCompiler (D:\Dev\workspace\ws-mentor-it\nextjs\module-federation\remote-app\node_modules\next\dist\compiled\webpack\bundle5.js:28:1467060)
at create (D:\Dev\workspace\ws-mentor-it\nextjs\module-federation\remote-app\node_modules\next\dist\compiled\webpack\bundle5.js:28:1467932)
at webpack (D:\Dev\workspace\ws-mentor-it\nextjs\module-federation\remote-app\node_modules\next\dist\compiled\webpack\bundle5.js:28:1468341)
at f (D:\Dev\workspace\ws-mentor-it\nextjs\module-federation\remote-app\node_modules\next\dist\compiled\webpack\bundle5.js:28:895636)
at HotReloaderWebpack.start (D:\Dev\workspace\ws-mentor-it\nextjs\module-federation\remote-app\node_modules\next\dist\server\dev\hot-reloader-webpack.js:859:51)
How do I make it not look in the "pages" folder but instead look for them in src/app/page.tsx?
from module-federation-examples.
Delete the app folder and only use pages.
from module-federation-examples.
Related Issues (20)
- Uncaught SyntaxError: Unexpected token function when use module federation v1.5 HOT 3
- Code Nextjs-v14 throws error when try to run HOT 5
- [Feature request/discussion] Allow having multiple instances of shared dependencies HOT 3
- Hot Module Reloading is solved! HOT 1
- [Question] Shared modules are duplicate in multi-bundle files of MF v8.2.2 above HOT 14
- Can I Remove remote.js?[hash] for cache remote.js HOT 2
- NPM package unavailable - nextjs-shared-v14 HOT 1
- [Bug][Nextjs13] Uncaught TypeError: Cannot read properties of undefined (reading 'consumes') HOT 2
- Examples issue HOT 3
- vue-cli master分支跑不起来 HOT 1
- [Question] URL parameters? HOT 6
- externals @module-federation/webpack-bundler-runtime no work HOT 1
- Dynamic-remotes shared config not work HOT 2
- Does V2 currently support Vite? HOT 1
- Microfe
- nextjs mf does not generate remoteEntry.js HOT 6
- Add ability to reduce requests waterfall for host-ui HOT 3
- [Help] Router Module forRoot Issue with Module Federation HOT 1
- css-Isolation not working in rspack example HOT 2
- Does it work with the Next 14 App router? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from module-federation-examples.