-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BrowserslistError: Unknown version 59 of op_mob #5164
Comments
Are you sure this is a valid browserslist query? Isn't accepted by https://browserslist.dev either... |
To solve it, at least temporarily, you can exclude the op_mob 59 by adding a extra rule to .browserslistrc My .browserslistrc file that avoid this issue is the next:
|
Thanks for the replies! I guess I don't understand why I'm getting this error. I've never touched anything browserlist related before and it's always worked fine. I did install a few libs and removed them afterwards, once I realized they weren't what I was looking for etc. This included deleting .parcel-cache, package-lock.json and node_modules (npm install) etc. but, again, not sure I understand why this is popping up out of the blue, as that's never been an issue before. In fact, I've never even had a .browserlistrc before and all was fine (maybe I should have had one either way but, I'm not sure why the error.) Anyway, thanks for the suggestions. I'll keep digging (or give those a try.) |
Well, adding the .browserlistrc and the not op_mod 59 (I used your exact code) didn't help :-( |
The alternative would have been updating browserslist/caniuse/... but you already did that...
|
Any chance you could provide a full code sample (repository?) so that I can reproduce the error? |
That's great! Thank you. I've added you as a contributor. I'll commit these latest changes that I've made, including the .browserlistrc. I should add, it's failing production build on Netlify as well, for whatever that's worth. |
I encountered the same. I tried many variants of browserlist config, parcel v1/v2, local/global, yarn/npm, delete all the caches, etc. No luck, have to switch to Snowpack for now. |
I tried running I see 18 instances of browserlist in the package-lock.json file, ranging from 4.0.0 on up to 4.14.3, which is the version Browerlist is at itself. Looks like Browserlist was updated only 2 days ago: https://github.com/browserslist/browserslist/releases Would reverting back to 4.14.2 do anything? Not sure how about doing that but, the release was release around the same time I started getting this error. Maybe I should post this up over there as well? |
So apparently, this is caused by "browserslist": [
"last 2 versions",
"> 1%",
"ie > 8",
"not dead"
], in this package.json in the smoothscroll-anchor-polyfill package. Passing that to Browserslist to get the actual versions, the result is import browserslist from "browserslist";
browserslist([ 'last 2 versions', '> 1%', 'ie > 8', 'not dead' ])
/*
[
'and_chr 85', 'and_ff 79',
'and_qq 10.4', 'and_uc 12.12',
'android 81', 'baidu 7.12',
'chrome 85', 'chrome 84',
'edge 85', 'edge 84',
'firefox 80', 'firefox 79',
'ie 11', 'ios_saf 14.0',
'ios_saf 13.4-13.7', 'ios_saf 13.3',
'ios_saf 12.2-12.4', 'kaios 2.5',
'op_mini all', 'op_mob 59',
'opera 70', 'opera 69',
'safari 14', 'safari 13.1',
'samsung 12.0', 'samsung 11.1-11.2'
]
*/ That is then passed to Babel which again calls Downgrading browserslist doesn't seem to help. But I would say this is a browserslist bug |
I've opened a browserslist issue: browserslist/browserslist#537 |
Wow, thanks so much for doing this! I wish I knew how to debug stuff like this, that's awesome! |
I temporarily fixed the issue with yarn:
and then |
In my case downgrading only "resolutions": {
"browserslist": "4.14.2",
"caniuse-lite": "1.0.30001129"
} |
Thanks guys! I can confirm on Parcel V2 (2.0.0-beta.1) @SolomoN-ua's solution worked and kirzka's did not. I should note that I installed Browserlite 4.14.2 directly in dependencies but, that didn't work. Good call on the cainuse-lite. Of course, being new, I wasn't aware there was a resolutions field. Looks like it's only for Yarn, which I've been considering switching to. Yarn Selective Version Resolutions There does, however, appear to be a package that adds this feature to NPM (not sure I had it setup properly, as I was unable to get this to work; the Yarn Resolutions did work, however.) Anyway, thanks again! P.s. the awesome @mischnic is making progress on this over at Browserlist: Looks like it's going to be addressed, which is awesome. And there is also another possible temporary work around (so far hasn't worked for me on Parcel V2, however): |
Build is currently broken due to parcel-bundler/parcel#5164
I use "scripts": {
"preinstall": "npx npm-force-resolutions"
},
"resolutions": {
"browserslist": "4.14.2",
"caniuse-lite": "1.0.30001129"
} thanks #5164 (comment) |
This is fixed in Browserslist 4.14.4. |
$ parcel serve ./src/index.html the same question: |
manual update browserslist to 4.14.5 |
Still having the issue too with
I had to do: "resolutions": {
"browserslist": "4.14.7"
}, |
Adding a dependency doesn't neccessarily update the version that other dependencies use.
That means:
|
Edit
then, error disappeared. |
🐛 bug report
I get the following error when build or serve:
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
Expected Parcel to build and serve
😯 Current Behavior
Not building or serving rather, errors.
💁 Possible Solution
If I was to guess, maybe browserslist needs an update? Or babel?
🔦 Context
I'm unable to build or serve.
I Googled and Issue searched here but, not sure how to address, sorry.
💻 Code Sample
🌍 Your Environment
The text was updated successfully, but these errors were encountered: