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.

Module Federation example not working?

See original GitHub issue

🐛 Bug report

Current Behavior

I downloaded module federation example (https://github.com/jaredpalmer/razzle/tree/canary/examples/with-module-federation) and run it.

First, I got error during “install” > Error! Failed to install razzle@canary, razzle-dev-utils@canary, try again.

To solve that I just tried running yarn install again. And all good.

Then I tried running it with yarn start.

No errors on console or terminal.

But when I open it on the browser nothing is showing up. Just blank page.

Not sure if I’m missing something?

Expected behavior

Should be able to see App rendering

<div>
    <h1>Bi-Directional</h1>
    <h2>App 1</h2>
    <LocalButton />
    <React.Suspense fallback="Loading Button">
      <RemoteButton />
    </React.Suspense>
  </div>

once opened on http://localhost:3000/

Same with App2

Reproducible example

https://github.com/jaredpalmer/razzle/tree/canary/examples/with-module-federation

Your environment

env: localhost versions: are the same provided in the package.json node: v12.19.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
fivethreeocommented, Mar 9, 2021

Fixed now

1reaction
fivethreeocommented, Mar 8, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · module-federation/module-federation-examples
Implementation examples of module federation , by the creators of module federation - Issues · module-federation/module-federation-examples.
Read more >
Webpack module federation is not working with eager shared ...
It seems like the main reason of why it failed initially was that remoteEntry.js file was loaded after the code that actually runs...
Read more >
Module Federation - webpack
Remote modules are modules that are not part of the current build but are loaded at runtime from a remote container. Loading remote...
Read more >
Webpack 5 module federation for Micro-frontend Architecture
Bonus — Fixing troubleshooting errors while setup. Note — This blog is a POC which explains the way with which we can create...
Read more >
Module Federation - SurviveJS
As a first step, we should use webpack's ModuleFederationPlugin and load the application asynchronously. The change in loading is due to the way...
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