Thursday 2 February 2023

angular ng build/ ng build --configuration production failed ng build error: Invalid version: "15.2-15.3"


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

cli/.browserslistrc


npx browserslist

and_chr 97
and_ff 95
and_qq 10.4
and_uc 12.12
android 97
baidu 7.12
chrome 97
chrome 96
chrome 95
chrome 94
edge 97
edge 96
firefox 96
firefox 95
firefox 94
firefox 91
firefox 78
ie 11
ios_saf 15.2-15.3
ios_saf 15.0-15.1
ios_saf 14.5-14.8
ios_saf 14.0-14.4
ios_saf 12.2-12.5
kaios 2.5
op_mini all
op_mob 64
opera 82
opera 81
safari 15.2-15.3
safari 15.1
safari 14.1
safari 13.1
samsung 16.0
samsung 15.0

The versions interval comes from here :

ios_saf 15.2-15.3
solution: change browserslistrc to 
# 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

Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

No comments:

Post a Comment