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

ng client - Cannot read properties of undefined (reading 'file') #50959

Closed
lucasalzone opened this issue Jul 6, 2023 · 3 comments
Closed

ng client - Cannot read properties of undefined (reading 'file') #50959

lucasalzone opened this issue Jul 6, 2023 · 3 comments

Comments

@lucasalzone
Copy link

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

common, platform-browser-dynamic, router

Is this a regression?

Yes

Description

When creating a new Angular project and then performing the build, I encounter the following error: Cannot read properties of undefined (reading 'file')

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

./node_modules/@angular/common/fesm2020/common.mjs - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError: C:\Users\luca.salzone\tmp\esempioBug\node_modules\@angular\common\fesm2020\common.mjs: Cannot read properties of undefined (reading 'file')

./node_modules/@angular/platform-browser/fesm2020/platform-browser.mjs - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError: C:\Users\luca.salzone\tmp\esempioBug\node_modules\@angular\platform-browser\fesm2020\platform-browser.mjs: Cannot read properties of undefined (reading 'file')

./node_modules/@angular/router/fesm2020/router.mjs - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError: C:\Users\luca.salzone\tmp\esempioBug\node_modules\@angular\router\fesm2020\router.mjs: Cannot read properties of undefined (reading 'file')

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

Angular CLI: 14.0.7
Node: 16.16.0
Package Manager: npm 8.11.0
OS: win32 x64

Angular: 14.3.0
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Anything else?

The issue started this morning. Yesterday it was working correctly with the same client version. Additionally, I noticed that the versions of dependencies in the package-lock.json file of @babel/parser have changed

@lucasalzone
Copy link
Author

I applied this workaround to solve the issue: I deleted the node-modules and package-lock.json files and replaced them with the ones from a project generated yesterday

@pkozlowski-opensource
Copy link
Member

Duplicate of angular/angular-cli#25496

@pkozlowski-opensource pkozlowski-opensource 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

2 participants