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

Most upvoted comments

thanks!

  1. npm cache clean --force
  2. rm -rf node_modules package-lock.json yarn.lock && npm install
  3. npm install caniuse-lite@1.0.30000974

temporary solution:

// package.json

  "resolutions": {
    "browserslist": "4.6.2",
    "caniuse-lite": "1.0.30000974"
  },

@ai I can confirm that forcing a yarn resolution for caniuse-lite@1.0.30000974 fixes the error. It must be an issue with the latest caniuse-lite@1.0.30000975 release.

I would recommend to set the latest npm dist-tag to 1.0.30000974 unpublish 1.0.30000975 temporarily 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-lite to “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 caniuse or caniuse-lite may have published a potentially breaking change that rolled into postcss-preset-env, which then rolled into browserslist and 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 android browser 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 all query ends up getting generated, which browserslist does not support.

temporary solution:

// package.json

  "resolutions": {
    "browserslist": "4.6.2",
    "caniuse-lite": "1.0.30000974"
  },

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 all query.

it seems like caniuse-lite has unpublished the bad version. rm -rf node_modules and reinstall deps. And clean yarn / npm cache on ur local machine

Update: nope they didn’t. It was me getting a cached response

Yes thanks, now it just prints a gazillion warnings 😉

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 😉

It must be an issue with the latest caniuse-lite@1.0.30000975 release.

I think Can I Use update just opened a bug in Nuxt. We never support andoid all query.

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.lock or package-lock.json, remove node_modules and run npm/yarn install again

temporary solution:

// package.json

  "resolutions": {
    "browserslist": "4.6.2",
    "caniuse-lite": "1.0.30000974"
  },

This method solved my problem.

for me works only like this & i dont delete & update node_modules

// package.json

  "devDependencies": {
...
    "browserslist": "4.6.2"
  },
  "resolutions": {
    "browserslist": "4.6.2",
    "caniuse-lite": "1.0.30000974"
  }

@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.30000975 doesn’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 all browser.

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.

Agree that locking is not really a good idea but maybe browserlist can silently ignore and hide this warning until caniuse-lite or browserslist releases proper fix?

If Browserslist will ignore it silently the real fix will be written free month later. I know how open source works.

Also ignoring android all means 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 uses cssdb to load the polyfillableFeatures, which in turn uses caniuse-lite. It is very likely caused by the latest caniuse-lite update.

Same error, my browserslist does not actually contain a android 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.

I have same issue when I use https://github.com/hiroppy/fusuma/. How to solve BrowserslistError: Unknown browser query ‘android all’?

updating to 4.6.3 specifically, run this command

npm i browserslist@4.6.3

if using yarn,

yarn add browserslist@4.6.3

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