Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 4, 2022 11:22 am GMT

Angular production build error for safari-15.2-15.3

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.


Original Link: https://dev.to/jeyanthan/angular-production-build-error-for-safari-152-153-45dk

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To