Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Module build failed: BrowserslistError: Unknown browser major #454

Closed
stomvi opened this issue Mar 27, 2018 · 3 comments
Closed

Module build failed: BrowserslistError: Unknown browser major #454

stomvi opened this issue Mar 27, 2018 · 3 comments

Comments

@stomvi
Copy link

stomvi commented Mar 27, 2018

I am using nuxt-community express-template with bootstrap@4.0.0. I updated the nuxt version of the express-template to nuxt 1.4.0 which depends on postcss-cssnext@3.1.0. Somehow autoprefixer@^7.1.1 that the latest postcss-cssnext is using may have a bug with browserslist@^2.2.2. They does not support one of the query defined in the browserslist of bootstrap:

last 1 major version

An error occurs during nuxt build:

Module build failed: BrowserslistError: Unknown browser major

Remove the last 1 major version from package.json of bootstrap works. Update the autoprefixer in postcss-cssnext to the latest version also works. I guess the problem is between the autoprefixer and browserslist that the later one does not recognize the query.

autoprefixer has to be updated to the newer version to make this work.

@stomvi stomvi changed the title Error Unknown browser major Module build failed: BrowserslistError: Unknown browser major Mar 27, 2018
@stomvi
Copy link
Author

stomvi commented Mar 27, 2018

For now, I just modify the yarn.lock file to force postcss-cssnext to use autoprefixer@8.2.0. If you are using npm, you can use shrinkwrap.

@jonathantneal
Copy link
Collaborator

Possibly resolved by #445

@MoOx
Copy link
Owner

MoOx commented May 29, 2018

postcss-cssnext has been deprecated in favor of postcss-preset-env. Read more at https://moox.io/blog/deprecating-cssnext/

@MoOx MoOx closed this as completed May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants