Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find the angular Invalid version 15.2-15.3 error?

Tags:

angular-cli

I created a new angular app with the angular CLI 13.0.4. It created an angular app version ~13.0.0. When I use the command ng build, I get the following error:

./node_modules/css-loader/dist/runtime/api.js - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Transform failed with 1 error:
error: Invalid version: "15.2-15.3"

./node_modules/css-loader/dist/runtime/noSourceMaps.js - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Transform failed with 1 error:
error: Invalid version: "15.2-15.3"

These are the different version that I use:

enter image description here

What should I do to fix this error?

------ UPDATE 3/2/2022 ------

Contents of the browserlist file:

# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
#   npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
like image 749
wonderful world Avatar asked Sep 03 '25 14:09

wonderful world


1 Answers

I commented out the line last 2 Safari major versions from the .browserslistrc file. The npm build is building the application successfully.

like image 163
wonderful world Avatar answered Sep 05 '25 02:09

wonderful world