-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Describe the bug
npm i
npm run dev
open in browser http://localhost:5010/app-1
in console.log there be an error.
After pressing F5 everything is OK and everything works correct.
To reproduce bug you must kill npm run dev and launch again.
This issue is also reproduced with lastest versions (everything including vite, vue, module-federation, etc).
Not sure where the problem is but if you remove shared from remote apps (app1, app2) then issue doesn't exists.
Also porting to non deprecated init to use registerRemotes and checking if getInstance() != null (always is not null) issue still exists.
Issue exists in firefox and chrome. I'm using linux env.
This repo is taken from https://dev.to/lmlonghuynh/building-a-micro-frontend-architecture-with-vue-3-vite-and-module-federation-1bb1
Version
probably all
Reproduction
https://github.com/lmlong-huynh/micro-frontend-sample
Relevant log output
[MF] Error loading remote module: Error: [ Federation Runtime ]: Please call createInstance first. #RUNTIME-009
View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/runtime/RUNTIME-009
error2 logger.ts:22
assert2 logger.ts:10
loadShare index.ts:71
res chunk-DW7XOL6G.js:17
promise callback*node_modules/__mf__virtual/app1__loadShare__vue__loadShare__.js chunk-DW7XOL6G.js:17
__require chunk-ZKAWKZG5.js:11
<anonymous> chunk-DW7XOL6G.js:31Validations
- 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.
- The provided reproduction is a minimal reproducible example of the bug.