Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libs index.ts is missing from the TypeScript compilation #1

Closed
marcintokarski opened this issue Apr 15, 2022 · 8 comments
Closed

libs index.ts is missing from the TypeScript compilation #1

marcintokarski opened this issue Apr 15, 2022 · 8 comments

Comments

@marcintokarski
Copy link

marcintokarski commented Apr 15, 2022

Hello,
I have a problem with start application, bellow error occured after nx serve-mfe static-host.

../libs/launcher/src/index.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: /marcin/workspace/example-nx-ng-mfe/libs/launcher/src/index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. at C:\marcin\workspace\example-nx-ng-mfe\node_modules\@ngtools\webpack\src\ivy\loader.js:64:26

../libs/shared/data-access/auth/src/index.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: /marcin/workspace/example-nx-ng-mfe/libs/shared/data-access/auth/src/index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. at C:\marcin\workspace\example-nx-ng-mfe\node_modules\@ngtools\webpack\src\ivy\loader.js:64:26

I have the same problem in my repo after migrate to nx 13.10.2 and change mfe config to withModuleFederation feature, which is great 👍 but unfortunatelly seems doesn't work. Could you help me?

@Coly010
Copy link
Owner

Coly010 commented Apr 15, 2022

1.Clone the repository
2.Run npm install
3.Run nx serve-mfe static-host
4.Navigate a browser to http://localhost:4200

@Coly010
Copy link
Owner

Coly010 commented Apr 15, 2022

I can't reproduce, even with a fresh clone

@marcintokarski
Copy link
Author

I did just that. Fresh clone, npm ci / install. I still have errors :( Additionally I did that on 2 computers. Is it OS related problem, maybe? I'm running on windows.

@Coly010
Copy link
Owner

Coly010 commented Apr 15, 2022

It would be the biggest difference between my test and yours. I have a windows vm, I’ll give it a go over the weekend

@marcintokarski
Copy link
Author

👍 If I could help please let me know. I'm waiting for your investigation ;)

@ak274
Copy link

ak274 commented Apr 18, 2022

I have cloned this repo and I am also facing the same issue and also in my project then i created one demo project to reproduce the problem and it also have the same issue. https://github.com/ak274/test-org

I have faced the issue with dynamic as well as static MFE. Raised a Bug on NX repo:-- nrwl/nx#9861

@Coly010
Copy link
Owner

Coly010 commented Apr 19, 2022

Looks like a windows issue. I have a PR on Nx now to fix nrwl/nx#9881

@Coly010
Copy link
Owner

Coly010 commented Apr 19, 2022

PR on Nx was merged, when the patch is released, I can update this example.

@Coly010 Coly010 closed this as completed Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants