building angular production causing "error: Invalid version: "15.2-15.3", this error is mainly coming from new safari browser in-compatibility. If the error comes, we can check first what are the browsers added in to our browsers list, this is the list controls angular application supported.
check the supported list.
npx browserslist
and_chr 99
and_ff 96
and_qq 10.4
and_uc 12.12
android 99
baidu 7.12
chrome 99
chrome 98
chrome 97
chrome 96
edge 99
edge 98
edge 97
firefox 98
firefox 97
firefox 96
firefox 91
ie 11
ios_saf 15.4
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 83
opera 82
safari 15.4
safari 15.2-15.3
safari 14.1
samsung 16.0
samsung 15.0
the highlighted line is causing issue, we can either remove or adding the following file in to your project would solve the problem.
Add .browserslistrc in to your project directory, and the following content.
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
not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line.
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
not ios_saf 15.2-15.3
not safari 15.2-15.3
it will now work.
Top comments (0)