I created an angular project in visual studio code(version 1.81.1). but when I try to run the program using "ng serve" command give below error.(Node version : 20.6.0,npm version : 10.0.0)
Cannot redefine property: File
Execution policies set as below
Can give any reason for the issue?
3
When I uninstalled node version 20.6.1 and installed node version 18.17.1, issue was fixed
There is an issue with node 20.6 that breaks babel. The fix for node has landed but not been released yet.
Downgrading to any previous version of Node (below 20.6) will fix the issue.
Babel has introduced a workaround in 7.22.17 with #15947 with allow Angular to run with 20.6.
7.22.17
upgrade to 20.6.1 and the problem will dissapear
Click here to cancel reply.
3
Answers
When I uninstalled node version 20.6.1 and installed node version 18.17.1, issue was fixed
There is an issue with node 20.6 that breaks babel. The fix for node has landed but not been released yet.
Downgrading to any previous version of Node (below 20.6) will fix the issue.
Babel has introduced a workaround in
7.22.17
with #15947 with allow Angular to run with 20.6.upgrade to 20.6.1 and the problem will dissapear