question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BrowserslistError: Unknown version 0 of and_chr

See original GitHub issue

Steps to reproduce

  1. browserslist@1.5.2 postcss@5.2.11 webpack@2.2.0
  2. browserslist config in the package.json
...
"browserslist": [
    "> 1% in RU",
    "last 2 versions"
]
...
  1. postcss.config.js is simple
module.exports = {
    plugins: [
        require('postcss-import')(),
        require('autoprefixer')()
    ]
};
  1. NODE_ENV=production webpack --hide-modules --bail throws
ERROR in ./styles/index.css
Module build failed: ModuleBuildError: Module build failed: BrowserslistError: Unknown version 0 of and_chr
    at error (~/{path_to_project}/node_modules/browserslist/index.js:29:11)
    at Function.select (~/{path_to_project}/node_modules/browserslist/index.js:555:21)
    at ~/{path_to_project}/node_modules/browserslist/index.js:180:41
    at Array.forEach (native)
    at browserslist (~/{path_to_project}/node_modules/browserslist/index.js:169:13)
    at isSupported (~/{path_to_project}/node_modules/caniuse-api/dist/index.js:75:10)
    at ~/{path_to_project}/node_modules/postcss-merge-rules/dist/lib/ensureCompatibility.js:87:66
...

PS

  • NODE_ENV != production -> ok
  • not use “> 1% in RU” -> ok
  • use “> 1% in US” -> not ok

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
aicommented, Jan 21, 2017

Technically it was Can I Use mistake. But it is hard to fix it there. So I add hack to Browserslist.

@ben-eb maybe we will fix it in you project. Can I use had version 0 in countries statistics, but 55 in global data.

0reactions
stevenvachoncommented, Jan 31, 2017

Scratch that – it was just a fluke. It started consistently failing again with the same error. While twice as slow, switching from npm install to yarn seems to be consistently working. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

BrowserslistError: Unknown version 55 of and_chr · Issue #128
Right now a temporary fix is setting the version key to 0 instead of 55 , otherwise this error is thrown: BrowserslistError: Unknown...
Read more >
Webpack production build: BrowserslistError: Unknown ...
Sounds like you've got an outdated css-loader . Delete your node_modules and reinstall. That should fix it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found