8

While running ng build --configuration=production I get the following error.

Error: C:/.../.scss from Css Minimizer
Error: Transform failed with 1 error:
error: Invalid version: "15.2-15.3"

How can I if fix this?

1
  • I have just found this issue after I update my project from Angular 11 to 12 and run it with the comman ng serve. Could somebody help us? Commented Jan 31, 2022 at 19:15

3 Answers 3

13

This has been fixed in version 12.2.16 and 13.2.1 of @angular/cli.

See https://github.com/angular/angular-cli/issues/22606

Sign up to request clarification or add additional context in comments.

Comments

13

Temporary fix

This is not really the solution, but a temporary fix
I had to add the following into my .browserslistrc file.

not ios_saf 15.2-15.3
not safari 15.2-15.3

Doing so will fix the error.

Solution

As @HeroWanders mentioned in his answer, this did get fix in the v12.2.16 of the @angular/cli library

Comments

0

I had the same error, what worked for me was also updating ng-packagr to 12.2.7. As far as I know, that's the only way to fix this without updating to Angular 13 (which I can't, because of an unlucky dependency).

see this comment on github or my SO post about this error

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.