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

nx ( serve | build ) <app> not work because cannot find module 'webpack' #7547

Closed
AndersonCastellon opened this issue Oct 28, 2021 · 6 comments
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug

Comments

@AndersonCastellon
Copy link

Current Behavior

I cannot serve my application and neither can I compile it

Expected Behavior

I should be able to serve or compile my application

Steps to Reproduce

run script to compile or serve locally

Screenshot from 2021-10-27 23-31-59

Environment

Screenshot from 2021-10-27 23-35-15

@mandarini mandarini added the community This is a good first issue for contributing label Oct 28, 2021
@mandarini
Copy link
Member

Hi there @AndersonCastellon ! Can you please provide the steps you followed to reach that step?

@AndersonCastellon
Copy link
Author

Hi @mandarini. I have followed the following steps

1- Create an empty nx workspace: In this steps exist an error about git repo config username and email
1-create-nx-workspace

2- Install @nrwl/angular package
2-install-angular-package

3- Create an Angular mfe App
3-create-angular-mfe-app

4- Try to serve and try to build mfe-demo app
4-try-to-build

Result of "nx report" for this demo

Screenshot from 2021-10-28 08-48-35

@vsavkin
Copy link
Member

vsavkin commented Oct 28, 2021

@AndersonCastellon thank you for submitting the issue. The problem is npm7's resolution algorithm. You can remove node_modules and your package-lock file, run npm install again and the correct lock file will be created and webpack will be found.

@vsavkin vsavkin added scope: angular Issues related to Angular support in Nx and removed community This is a good first issue for contributing labels Oct 28, 2021
@vsavkin
Copy link
Member

vsavkin commented Oct 28, 2021

@Coly010 @leosvelperez I imagine this is due to some dep missing in some package. I'm almost certain this is in the Angular and is outside of control.

@AndersonCastellon
Copy link
Author

It worked very well for me, thanks @vsavkin

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
Development

No branches or pull requests

3 participants