Nuxt.js: BrowserslistError: Unknown browser query `android all`

Created on 18 Jun 2019  路  21Comments  路  Source: nuxt/nuxt.js

just flower the offical doc to use the create-nuxt-app to create new project

npx create-nuxt-app pc-server

then

cd pc-server
$ npm install
$ npm run dev

after this command, the nuxt occurs the errors
image

env:
npx ^6.9.0
node v10.8.0
npm ^6.9.0

This question is available on Nuxt community (#c9378)
bug-confirmed waiting for dependency

Most helpful comment

Quick fix for now is to add the following to your package.json to revert to an older caniuse-lite version:

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

Only works with yarn, not with npm

Not advisible anymore due to quick browserlist update

All 21 comments

I have the same issue - please reopen :)

the same

the same

the same

it is a problem with caniuse-lite https://github.com/browserslist/browserslist/issues/382#issuecomment-503009048

please use :+1: reaction in the first comment instead of the same.

Quick fix for now is to add the following to your package.json to revert to an older caniuse-lite version:

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

Only works with yarn, not with npm

Not advisible anymore due to quick browserlist update

Only works with yarn, not with npm if it work in yarn, for npm can try use https://www.npmjs.com/package/npm-force-resolutions

same problem. need to fix

Try to update Browserlist, it works with 2.8.1

As mentioned by @albertleigh the issue is with the caniuse-lite new version, resolutions fix the issue with yarn and npm install [email protected] --save-dev --save-exact fixes the issue with NPM for now.

We made a dirty fix in Browserslist 4.6.3 to fix the problem:

https://twitter.com/Browserslist/status/1140911400304467968

[email protected] released which prevents lots of warnings in the console:

image

Snipaste_2019-06-18_21-12-47
Does this issue affect the project? How to solve it? My God锝烇紒

just flower the offical doc to use the create-nuxt-app to create new project

npx create-nuxt-app pc-server

then

cd pc-server
$ npm install
$ npm run dev

after this command, the nuxt occurs the errors
image

env:
npx ^6.9.0
node v10.8.0
npm ^6.9.0

_This question is available on Nuxt community (#c9378)_

The same situation of my project. I don鈥檛 know if it will affect the projects that have been deployed online. Only God knows.

We will have warning until postcss-preset-env will not be fixed properly inside. We need just wait.

@DereKEasH use standard nuxt server yarn nuxt dev instead :) Custom server does not register consola wrapper

@DereKEasH use standard nuxt server yarn nuxt dev instead :) Custom server does not register consola wrapper

I used npm to create the project, but this has not happened in the past few days.

You don't have to downgrade anymore. The latest versions of caniuse-lite now also does no longer show the error. Installing it manually is still required, but you can use the latest version.

Yarn (tested):

Add to package.json.

"resolutions": {
  "caniuse-lite": "1.0.30000977"
}

npm (untested):
Install directly

npm install [email protected] --save-dev --save-exact

Pinning version in package.json (as of browser list maintainer also suggested) is not a good idea. Would be better to recreate lock-file or use yarn/npm upgrade.

Closing as regression is fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattdharmon picture mattdharmon  路  3Comments

mikekidder picture mikekidder  路  3Comments

uptownhr picture uptownhr  路  3Comments

surmon-china picture surmon-china  路  3Comments

nassimbenkirane picture nassimbenkirane  路  3Comments