When I try to build my angular project in production environment:
the console returns this error:
ng serve is working fine and ng build without parameters seems to work too. Why does angular return such an error?
Thanks in advance for your help
When I try to build my angular project in production environment:
the console returns this error:
ng serve is working fine and ng build without parameters seems to work too. Why does angular return such an error?
Thanks in advance for your help
The reason for this error is the command –prod is deprecated since Angular 12 and removed in Angular 14 based on this Angular-Deprecated APIs and features.
Use --configuration production instead.
I've deleted : package-lock.json
change: "heroku-postbuild": "ng build --prod" to "heroku-postbuild": "npm run build"
into package.json