angular-builders
angular-builders copied to clipboard
After Angular V13 upgrade to Angular V14 the compilation fails.
Describe the Bug
I have updated my Angular v13 app to Angular v14. When updating the NPM packages I didn't get any errors. I have also updated the "@angular-builders/custom-webpack": "^14.0.0"
. When running ng serve
I get errors, which were not present before.
Minimal Reproduction
I am sorry, but I cannot share the app minimal reproduction.
Expected Behavior
The compilations of the Angular app should finish as expected.
Screenshots
I get the following errors when compiling my Angular app. Before updating to v14 and updating to `"@angular-builders/custom-webpack": "^14.0.0"`` it worked flawlessly.
Environment
Libs
- "@angular/core": "^14.1.0",
- "@angular-devkit/build-angular": "^14.1.0",
- `"@angular-builders/custom-webpack": "^14.0.0"``.
For Tooling issues:
- Node version: 16.16.0
- Platform: Windows
Please try regenerating package-lock.json
(remove and run npm install
).
I have tried all this things, and have also found the solution. The .style.css file that you get errors for, you need to add to angular.json styles. And then the app compiles normally. Don't know why this wasn't the problem in angular 13, but has become a problem in version 14.
I have the same problem.
Try adding the files that the compiler tells you about to angular.json. This solved my problem. Maybe there is even better workaround.
@polhek are you able to provide a reproducible example? Unfortunately, its lack makes the issue stale because no one can understand what's happening on your side just by looking at your screenshots.
(note: the reproducible example was required when you were opening an issue: Our policy is that issues reported without a reproduction will be closed immediately and then reopened once a reproduction has been provided. Please respect the developers of this project by doing this.)
We figured out that with Angular 14 we had to import every .scss of angularJS to angular.json. It wasn't error on the package site.
Sorry for the inconveniences.