-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Build fails with Cannot redefine property: File
using Node 20.6.0
#25782
Comments
nodejs/node#49497 sounds like it could cause this behavior. I noticed that the For the sake of completeness, here is the babel issue: babel/babel#15927 |
Hi, thanks for reporting this. As you mentioned this is an upstream issue for an unsupported version yet. |
- see similar symptoms in angular/angular-cli#25782
the problem is the version of Node. downgrade it to 16.14.2 |
Edit: my bad, Nx cache was involved and downgrading Node to |
Just encountered this with the latest node on GitLab pages. Didnt happen before. |
This issue is not related to NPM and not even related to Angular CLI. |
Mine still didn't work @minikdev even after changing the node image |
@ogabz12345 I just tried to build it and it worked, you might need to rebuild your image, |
@minikdev Did the exact same thing, still getting same error and it literally started this morning. I also use |
I encountered the same issue. After switching in my Dockerfile from |
I had same issue and switched this in my Dockerfile: to and now it works fine! |
force node 20.5 fix the issues |
@hhfrancois |
Finally worked. used |
Automated testing that would catch this is hard |
|
Replacing |
Github actions fails for my project today and it worked yesterday. Downgraded to node 18 and it works fine.
For anyone facing this problem using Github actions on a project change to
|
On macOS using homebrew, you can fix this for now by installing the git HEAD for node (fixed by nodejs/node#49500) until the next version includes the fix:
Note this makes node from scratch locally, which takes considerably longer than typical brew install. |
Switching from Node 20.6.0 to Node 18.17.1 fixed the problem for me. nvm makes it easy to change Node versions. |
I had same issue. Punishment for using latest node version in Dockerfile :D |
We added a workaround for this in |
To hopefully fix the build issues Node.js 20 and 18 don't work. Partially due to angular/angular-cli#25782
I had the same problem in a project and I tried with version 20, the project didn't compile with prayer or macumba, much less with voodoo, I had to downgrade to version 18 and then it worked. |
@marquessbr You can also use 20.6.1. Only 20.6.0 had this bug. |
cool! |
thank you, |
Try changing you node version. I mean you can downgrade and try. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Command
build
Is this a regression?
The previous version in which this bug was not present was
No response
Description
If you use Node 20.6.0 (released yesterday) to build an Angular 16 papp, the following error occurs:
I know Node 20 is not officially supported at the moment and it's not yet in LTS, but it worked before (in 20.5.1) and maybe it's good too approach this issue early. The relevant changes in Node might get backported to node 18.
I also don't know yet if this is an issue in Node, babel or angular-cli. In either case, it might be good to have this as a tracking issue.
Also affects Angular 15 and Angular 17.0.0-next.0.
Minimal Reproduction
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: