browserslist: BrowserslistError: Unknown browser query `android all`. Maybe you are using old Browserslist or made typo in query.
BrowserslistError: Unknown browser query `android all`. Maybe you are using old Browserslist or made typo in query.
I received this error when using the react-starter-app, maybe its got to do something with BrowsersList itself, hence reporting it here.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 225
- Comments: 82 (19 by maintainers)
Commits related to this issue
- Lock caniuse-lite version for temporary bug fix caniuse-lite has updated recently to 1.0.30000975 and this issue appeared https://github.com/browserslist/browserslist/issues/382. Using 1.0.30000974 ... — committed to nmonin-spro/browserslist by nmonin-spro 5 years ago
- fix(deps): pin `caniuse-lite` https://github.com/browserslist/browserslist/issues/382 — committed to ClarkSource/ember-makeup by buschtoens 5 years ago
- fix: issue about package.json on "browserslist" (https://github.com/browserslist/browserslist/issues/382) — committed to zhusjfaker/egg-react-ssr by deleted user 5 years ago
- fix: issue about package.json on "browserslist" (https://github.com/browserslist/browserslist/issues/382) — committed to zhusjfaker/egg-react-ssr by deleted user 5 years ago
- fix: issue about package.json on "browserslist" (https://github.com/browserslist/browserslist/issues/382) — committed to zhusjfaker/egg-react-ssr by deleted user 5 years ago
- Temp fix for BrowserslistError https://github.com/browserslist/browserslist/issues/382 — committed to canonn-science/CAPIv2-Strapi by derrickmehaffy 5 years ago
- Migrate to Strapi Beta version (#135) * Beta.5 update * remove SQL Ignore * fix travis * One more * Fuck * fix travis users * update connection pooling * Migrate Alter Webhooks ... — committed to canonn-science/CAPIv2-Strapi by derrickmehaffy 5 years ago
- fix browserlist bug temporary https://github.com/browserslist/browserslist/issues/382#issuecomment-503398632 — committed to christophervoigt/website by christophervoigt 5 years ago
- build: fix build script https://github.com/browserslist/browserslist/issues/382 — committed to fisker/fu-dialog by fisker 5 years ago
- Fix browserversion warnings Part of #1154. Fix the warnings that happen after the `react-scripts` update that look like this: ``` BrowserslistError: Unknown browser query `android all` Browserslist... — committed to cfcosta/kiali-ui by deleted user 5 years ago
- Fix browserversion warnings (#1278) Part of #1154. Fix the warnings that happen after the `react-scripts` update that look like this: ``` BrowserslistError: Unknown browser query `android all... — committed to kiali/kiali-ui by deleted user 5 years ago
- Testing Strapi beta in staging environment (#142) * Fix typo * Update issue templates * Migrate to Strapi Beta version (#135) * Beta.5 update * remove SQL Ignore * fix travis * One ... — committed to canonn-science/CAPIv2-Strapi by derrickmehaffy 5 years ago
thanks!
npm cache clean --forcerm -rf node_modules package-lock.json yarn.lock && npm installnpm install caniuse-lite@1.0.30000974temporary solution:
@ai I can confirm that forcing a yarn resolution for
caniuse-lite@1.0.30000974fixes the error. It must be an issue with the latestcaniuse-lite@1.0.30000975release.I would recommend to
set theunpublishlatestnpm dist-tag to1.0.300009741.0.30000975temporarily to reduce the inflow of new “same” comments.Tracking issue here: https://github.com/ben-eb/caniuse-lite/issues/27
🚨 🚨 Please stop posting “same” comments! 🚨 🚨
Still getting this
BrowserslistError: Unknown browser query "android all"100500x times in the console.I think it’s happening because of autoprefixer/postcss-preset-env have in dependencies the older version.
So I hope they will fix it ASAP.
Same issue using Nuxt
FATAL Unknown browser query android all. Maybe you are using old Browserslist or made typo in query.
at unknownQuery (node_modules/browserslist/index.js:204:10) at node_modules/browserslist/index.js:296:11 at Array.reduce (<anonymous>) at resolve (node_modules/browserslist/index.js:237:18) at browserslist (node_modules/browserslist/index.js:361:16) at supportedBrowsers.some.supportedBrowser (node_modules/postcss-preset-env/index.js:438:105) at Array.some (<anonymous>) at stagedFeatures.filter.feature (node_modules/postcss-preset-env/index.js:438:80) at Array.filter (<anonymous>) at postcss$1.plugin.opts (node_modules/postcss-preset-env/index.js:438:44) at creator (node_modules/postcss/lib/postcss.js:133:35) at config.plugins.sortPlugins.map (node_modules/@nuxt/webpack/dist/webpack.js:4128:18) at Array.map (<anonymous>) at PostcssConfig.loadPlugins (node_modules/@nuxt/webpack/dist/webpack.js:4122:10) at PostcssConfig.config (node_modules/@nuxt/webpack/dist/webpack.js:4158:14) at StyleLoader.postcss (node_modules/@nuxt/webpack/dist/webpack.js:4215:39)
I released a very dirty fix in Browserslist 4.6.3. Does it fix the problem?
updat
caniuse-liteto “1.0.30000974” fixed the problem for me.@testcderick nope. Nobody wants to do CSS tools in the current world when authors of CSS tools don’t have followers and community support.
“browserslist”: { “production”: [ “>0.2%”, “not dead”, “not op_mini all” ], “development”: [ ] } Update to your package.json . it worked for me as well.
I have posted this in other threads, but I will share it here as well:
It looks like
caniuseorcaniuse-litemay have published a potentially breaking change that rolled intopostcss-preset-env, which then rolled intobrowserslistand threw this error or warning.How it worked: More or less, caniuse stats are provided as an object of features, like
{ "css-all": {}, "css-any-link": {} }. Within each feature, stats are provided as an object of browsers, like{ "android": {}, "edge": {} }. Within each browser, stats are provided as an object of versions or version ranges, like{ 4.1": "n", "4.2-4.3": "n" }.For example, one tree of features might look like
{ "css-all": { "android": { "4.1": "n", "4.2-4.3": "n" } } }.What changed: Within the
androidbrowser object of versions, stats now provide a simplified"all"value.This means one tree of features might look like
{ "css-all": { "android": { "all": "n" } } }.That is how the
android allquery ends up getting generated, which browserslist does not support.This method solved my problem.
Builds is okay now, since the latest update to caniuse-lite from 5 hours ago.
Update the version of caniuse 1.0.30000976 and everything will be fine.
@ikiarest we never supported
android allquery.it seems like
caniuse-litehas unpublished the bad version.rm -rf node_modulesand reinstall deps. And clean yarn / npm cache on ur local machineUpdate: nope they didn’t. It was me getting a cached response
The warnings is a payment for dirty fix (we need a real fix and warnings will force us to create it)
no one not working with nuxt 😦
“dependencies”: { “caniuse-lite”: “^1.0.30000975”, “react”: “^16.8.6”, “react-dom”: “^16.8.6”, “react-scripts”: “3.0.1”, “browserslist”: “4.6.3” }
npm update npm start Worked for me
@ai Yes thanks, now it just prints a gazillion warnings 😉
I think Can I Use update just opened a bug in Nuxt. We never support
andoid allquery.npm install caniuse-lite@1.0.30000974
This solution helped me
Hola me paso lo mismo, la solucion que entonces fue ir al package.json, browserlist[ ], pero deja la version en las dependencias !!!
I’ve had the same issue. My fix was to add the dependancy: “postcss-preset-env” (Latest) to my packge.json. I noticed that a dependancy of a dependancy used an older version. With the failing query. Adding it as dev dependancy worked for me
@Rockshox93 remove
yarn.lockorpackage-lock.json, removenode_modulesand run npm/yarn install againfor me works only like this & i dont delete & update node_modules
// package.json
@jimblue, since the break and the fix both occurred in a patch releases of caniuse-db, you don’t need a new release. You just get the fix the next time your dependencies are updated, the same way you got the break.
Do we have some alternative package of postcss-preset-env?
1.0.30000975doesn’t work 💃@SobakaSlava postcss-preset-env has a code to generate browsers list accounting to selected features.
With fresh Can I Use data (Android browser was marked that it supported something new) it started to add non-existed
android allbrowser.The problem is with this browsers list generation.
WTF, this issue has eaten up my whole day. Still, I’m struggling to run my app with this stinking thing. Any help would be appreciated.
If Browserslist will ignore it silently the real fix will be written free month later. I know how open source works.
Also ignoring
android allmeans that we can miss some prefixes for Android browser. It is a dirty did, Browserslist output is still incorrect (because wrong input was sent into it).@ai It’s
postcss-preset-env, which in turn usescssdbto load thepolyfillableFeatures, which in turn usescaniuse-lite. It is very likely caused by the latestcaniuse-liteupdate.Same error, my
browserslistdoes not actually contain aandroid all, where does it come from?I ran into this issue and realized that I was typing “npx browserlist” instead of “npx browserslist” (plural). This resolved the issue.
I have the same problem when I am creating a production build
@sam77sakib You need to update the package.json update
"browserslist": "4.6.2"and add this"resolutions": { "browserslist": "4.6.2", "caniuse-lite": "1.0.30000974" }remove node_modules and package-loc.json or yarn.lock if you are using yarn. then yarn install. it will be fixed.
@AlexLevus Your solution fixed the logging issue but it created styling problems in our dev environment instead.
updating to
4.6.3specifically, run this commandif using yarn,
There is an issue in Nuxt. They do something wrong and use query which we never support.
have the issue when using postcss-preset-env using rollup, seems create-react-app uses this too