question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vendor bundles requested from incorrect host:port when using Next 11

See original GitHub issue

Please see the example repo https://github.com/Pkearney2021/module-federation-next11

Expected behaviour: Bundles from the remote a requested from the correct host and port

Actual behaviour: The bundles are being requested from the current host.\

http://localhost:3001/_next/static/chunks/vendors-node_modules_react_jsx-dev-runtime_js.js Should be http://localhost:3000/_next/static/chunks/vendors-node_modules_react_jsx-dev-runtime_js.js

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:10

github_iconTop GitHub Comments

2reactions
rmunchcommented, Jun 24, 2021

Not sure this is the solution, but in previous examples in this repo and the module-federation-examples, the remote specifies Webpack’s publicPath option to point back to its own port so that the host knows where to look:

if (!isServer) {
    config.output.publicPath = "http://localhost:3030/_next/";
}

Untested, but may be helpful.

0reactions
lednhatkhanhcommented, Jun 24, 2021

@Pkearney2021 Thank you, that works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ssl - Java: sun.security.provider.certpath. ...
In this case, the "unable to find valid certification path to requested target" message is being produced due to the missing intermediate certificate....
Read more >
Webpack 5 Adoption · Discussion #23498 · vercel/next.js
An issue I'm having with next-auth and webpack5 outlined here. ... node_modules/next/dist/build/webpack-config.js:40 const isLocal=request.startsWith('.
Read more >
Docker Compose release notes
Fixed compose#9577; List only running containers when using --all=false . ... Pull Request compose#10019; Added mode field for tmpfs mount permissions.
Read more >
JDK 11 Release Notes, Important Changes, and Information
The Release Notes describe important changes, enhancements, removed APIs and features, deprecated APIs and features, and other information about JDK 11 and Java ......
Read more >
Novell iManager - Multiple Vulnerabilities
With iManager you can manage Novell Open Enterprise Server, Novell Identity Manager ... HTTPSConnection(host, port) try: conn.request('GET', ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found