module-federation / vite

Vite Plugin for Module Federation
MIT License
307 stars 22 forks source link

Build is failing with Unfinished hook action(s) on exit: (proxyRemoteEntry) load "virtual:mf-REMOTE_ENTRY_ID" #132

Open mshima opened 2 weeks ago

mshima commented 2 weeks ago

Is there a way to debug the error?

x Build failed in 2.20s
error during build:
Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(proxyRemoteEntry) load "virtual:mf-REMOTE_ENTRY_ID"
gioboa commented 2 weeks ago

With VSCode you can run scripts in debug mode and you can use the breakpoints to proceed step by step.

zhangHongEn commented 2 weeks ago

Is there a way to debug the error?

x Build failed in 2.20s
error during build:
Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(proxyRemoteEntry) load "virtual:mf-REMOTE_ENTRY_ID"

Could you provide a reproducible example? I have a general idea of the cause of this error, but I don’t know how to reproduce it.​ @mshima

mshima commented 2 weeks ago

@zhangHongEn I've found the error. The exposed modules was not found. Execution vite correctly shows the error message, but vite build erroring with this error.

Happened when migrating from Webpack which does not require vue extension in exposes.

gioboa commented 2 weeks ago

@mshima Can we add a warning in the terminal for this?

mshima commented 2 weeks ago

@mshima Can we add a warning in the terminal for this?

Would be nice to fail with correct error message.

gioboa commented 2 weeks ago

Can we throw the correct one?