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

Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js): Cannot read properties of undefined (reading 'file') #50961

Closed
waxthevan opened this issue Jul 6, 2023 · 4 comments

Comments

@waxthevan
Copy link

waxthevan commented Jul 6, 2023

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

Yes

Description

In the company i work every pipeline that builds for our apps (some in angular 12, some in angular 15) are failing with the same error. Created a simple test app and try to serve it, and that's also failing on latest version:

image
image

Has been happening for the last one hour, so I assume it's related to a package that angular install as dependency or the packages that they depend since installing the packages with strict versions didn't solve the issue.

Please provide a link to a minimal reproduction of the bug

Repro steps:

  • Clean node_modules
  • npm install
  • ng serve

Please provide the exception or error you saw

Some examples from a lot of other same bugs from different packages:

Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError: \web\node_modules\@angular\cdk\fesm2020\collections.mjs: Cannot read properties of undefined (reading 
'file')

Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError: C:web\node_modules\@angular\material\fesm2020\icon.mjs: Cannot read properties of undefined (reading 'file')

Please provide the environment you discovered this bug in (run ng version)

12.x.x - 15.x.x - 16.x.x

Anything else?

It's a global issue so you can check the tickets people have been logging since one hour.
https://stackoverflow.com/questions/76627986/getting-problem-starting-serving-new-project-angular
https://stackoverflow.com/questions/76627746/module-build-failed-in-angular-router
https://stackoverflow.com/questions/76627367/angular-new-project-cannot-read-propertie

@ohois
Copy link

ohois commented Jul 6, 2023

I have exactly the same error.

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 16.1.3
Node: 16.20.1
Package Manager: yarn 3.6.0
OS: linux x64

Angular: 16.1.3
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, platform-browser
... platform-browser-dynamic, router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1601.3
@angular-devkit/build-angular   16.1.3
@angular-devkit/core            16.1.3
@angular-devkit/schematics      16.1.3
@schematics/angular             16.1.3 (cli-only)
ng-packagr                      16.1.0
rxjs                            7.8.1
typescript                      5.1.6

@waxthevan
Copy link
Author

waxthevan commented Jul 6, 2023

related: angular/angular-cli#25496

@alan-agius4
Copy link
Contributor

Duplicate of angular/angular-cli#25496

@alan-agius4 alan-agius4 marked this as a duplicate of angular/angular-cli#25496 Jul 6, 2023
@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2023
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants