Skip to content
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 55 of and_chr #340

Closed
kristoferjoseph opened this issue Jan 11, 2017 · 27 comments
Closed

BrowserslistError: Unknown version 55 of and_chr #340

kristoferjoseph opened this issue Jan 11, 2017 · 27 comments

Comments

@kristoferjoseph
Copy link

If I add cssnano to my project I get this error.
If I remove it the error goes away.
Please advise.
Thank you kindly.

@ben-eb
Copy link
Collaborator

ben-eb commented Jan 11, 2017

Are all of your dependencies up to date? This might be caused by overlapping caniuse-db versions.

@kristoferjoseph
Copy link
Author

Yes. Even after updating all dependencies it still throws this error. I am sad. 😢

@ben-eb
Copy link
Collaborator

ben-eb commented Jan 11, 2017

That's odd. @sylvainpolletvillard had this issue earlier and it was resolved by updating caniuse-db manually to the latest version. Does this work for you?

@kristoferjoseph
Copy link
Author

How does one go about doing this?
npm i caniuse-db ?

@ben-eb
Copy link
Collaborator

ben-eb commented Jan 12, 2017

Yeah, the current version is 1.0.30000605; Fyrd/caniuse@67737db

@sylvainpolletvillard
Copy link

sylvainpolletvillard commented Jan 12, 2017

Yes, I got the same issue today and solved it with npm update caniuse-db
It works with caniuse-db version 1.0.30000605

@Xayah2709
Copy link

Same error here.
I found that it comes from https://github.com/ben-eb/postcss-merge-rules, that uses caniuse-api@1.5.2.

For now, I only exclude merge-rules from my optimization process:
cssnano({ mergeRules: false })

@kristoferjoseph
Copy link
Author

solution:
npm i caniuse-db --save with npm 3+

@poxrud
Copy link

poxrud commented Jan 13, 2017

Same error, npm i caniuse-db --save fixed it

@eseQ
Copy link

eseQ commented Jan 16, 2017

@kristoferjoseph hm, thanks, that work for me

@ScottSmith95
Copy link

ScottSmith95 commented Jan 20, 2017

I'm still getting this error, even with the autoprefixer optimisation disabled and after running npm update caniuse-db. I've purged my node_modules directory as well.

The error I'm specifically receiving is Unknown version 0 of and_chr

@ben-eb
Copy link
Collaborator

ben-eb commented Jan 21, 2017

@ScottSmith95 Does the latest release of browserslist resolve this issue for you? browserslist/browserslist#110 (comment)

@ScottSmith95
Copy link

Yes, looks like this issue is resolved for me now.

@manuelbieh
Copy link

Same error here. Had to pin cssnano@3.9.1. Everything after 3.9.1 throws the error mentioned above.

@ben-eb
Copy link
Collaborator

ben-eb commented Jan 24, 2017

@manuelbieh Does upgrading browserslist to 1.6 work for you?

@manuelbieh
Copy link

Seems like it is/was something completely different. I had 2 different versions of browserlist installed. One (1.4.0) came with an old version of browserlist and css-loader had its own (1.6.0) and whatever it was, it was broken. I cant say for sure if my downgrade to 3.9.1. really was what fixed it but after getting rid of browserlist 1.4.0 everything works for me now, sorry 😃

@ben-eb
Copy link
Collaborator

ben-eb commented Jan 24, 2017

Alright, cool. Seems like this can be marked resolved now. 😄

@ben-eb ben-eb closed this as completed Jan 24, 2017
@stevenvachon
Copy link
Contributor

stevenvachon commented Jan 30, 2017

I get this error repeatedly on Semaphore CI, but not locally. Dunno which postcss plugin is causing it.

@GautierT
Copy link

GautierT commented Feb 9, 2017

Maybe a

npm install -g npm@latest

cd your_project_directory
rm -rf node_modules
npm install

can help
facebook/create-react-app#1454 (comment)

@stevenvachon
Copy link
Contributor

It's all a fresh install on CI. Somehow, using yarn instead of npm install made it work.

@notacouch
Copy link

notacouch commented Mar 2, 2017

Started getting this error all of the sudden with a fresh install, setting mergeRules to false as per @Thibautj88 's comment did the trick for me.

I'm on browserslist 1.7.5.
caniuse-db is on 1.0.30000631 via autoprefixer 6.7.6.
cssnano is 3.10.0 via gulp-cssnano 2.1.2

@ben-eb
Copy link
Collaborator

ben-eb commented Mar 2, 2017

@notacouch Please provide a minimal reproduction, I am not getting this error after the latest browserslist release.

notacouch added a commit to notacouch/mergerules-bug-test that referenced this issue Mar 2, 2017
@link cssnano/cssnano#340 (comment)

Reduced conflicting CSS down to  :target pseudo class and a relative matching selector (the matching selector could be a descendant after :target).

Reduced browserslist issue down to custom stats file with an ‘and_chr’ browser.

Run:
gulp 'Copy nested .css files directly to /css/'
@notacouch
Copy link

@ben-eb Thanks for asking. I had no idea how to go about this or if I could even reproduce it but... I did.

Set up a repo here to demonstrate it:
https://github.com/notacouch/mergerules-bug-test

quoting the commit message:

Reduced conflicting CSS down to :target pseudo class and a relative matching selector (the matching selector could be a descendant after :target).

Reduced browserslist issue down to custom stats file with an ‘and_chr’ browser.

Run:
gulp 'Copy nested .css files directly to /css/'

@ben-eb
Copy link
Collaborator

ben-eb commented Mar 2, 2017

@notacouch Thanks, I've created an issue in Browserslist for this. browserslist/browserslist#128

@notacouch
Copy link

@ben-eb Thanks for following through with that. They patched that up real quick, too. Nice.

@sgarcia-dev
Copy link

sgarcia-dev commented Mar 24, 2017

Thank you @GautierT, your solution worked for me 👍

@stevenvachon
Copy link
Contributor

stevenvachon commented Mar 24, 2017

@sgarcia-dev this issue should be fixed with the latest versions.

Edit: Ah, that's what @GautierT's solution was -- to reinstall everything with latest versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests