module-federation-examples icon indicating copy to clipboard operation
module-federation-examples copied to clipboard

Errror in starting the project -> Unable to compile federated types

Open AsuraKev opened this issue 1 year ago • 3 comments

Hi there, I am doing a simple POC on a consumer MFE but i am having trouble starting the project up. The error message is

Unable to compile federated types, Error: compile TS failed, the original command is 'npx tsc --project D:\Personal Projects\MicroFrontend\myMask Provider MFE\node_modules.federation\tsconfig.0790d0a2174de73475aea7c6f31396c9.json' Error: ENOENT: no such file or directory, open 'D:\Personal Projects\MicroFrontend\myMask Provider MFE\[email protected]'

my rsbuild.config.ts looks like

![image](https://github.com/user-attachments/assets/8d007382-9ad5-432a-a1c7-2eabed79c0ac

I am following the offical Module fed site and examples and not sure what went wrong... thanks :)

AsuraKev avatar Sep 26 '24 02:09 AsuraKev

Does the build not work at all or does it just display this in terminal and app still runs?

ScriptedAlchemy avatar Oct 04 '24 23:10 ScriptedAlchemy

The error is displayed in the the terminal and the app runs. However I noticed that this error doesnt appear when configuration module federation using the RsBuild way and only occurs when configuring via tools.rspack object :/

AsuraKev avatar Oct 04 '24 23:10 AsuraKev

Rsbuild probably configures additional things, like uses a memory fs etc. Maybe override it also causes some interference

ScriptedAlchemy avatar Oct 06 '24 22:10 ScriptedAlchemy