jaydenseric/Barebones

Issue with browserlist

thenationofalex opened this issue · 5 comments

Node Version: v7.0.0
NPM Version: v4.1.1

When running yarn run build:watch Webpack fails with the following error:

Child extract-text-webpack-plugin:
        + 1 hidden modules
    
    ERROR in ./~/css-loader?sourceMap&-autoprefixer&importLoaders=1!./~/postcss-loader!./components/app/index.css
    Module build failed: BrowserslistError: Unknown version 0 of and_chr
        at error (/Applications/MAMP/htdocs/Site/node_modules/browserslist/index.js:29:11)
        at Function.select (/Applications/MAMP/htdocs/Site/node_modules/browserslist/index.js:555:21)
        at /Applications/MAMP/htdocs/Site/node_modules/browserslist/index.js:180:41
        at Array.forEach (native)
        at browserslist (/Applications/MAMP/htdocs/Site/node_modules/browserslist/index.js:169:13)
        at isSupported (/Applications/MAMP/htdocs/Site/node_modules/caniuse-api/dist/index.js:75:10)
        at /Applications/MAMP/htdocs/Site/node_modules/postcss-merge-rules/dist/lib/ensureCompatibility.js:87:66
        at /Applications/MAMP/htdocs/Site/node_modules/postcss-selector-parser/dist/selectors/container.js:170:26
        at Selector.each (/Applications/MAMP/htdocs/Site/node_modules/postcss-selector-parser/dist/selectors/container.js:153:22)
        at Selector.walk (/Applications/MAMP/htdocs/Site/node_modules/postcss-selector-parser/dist/selectors/container.js:169:21)
        at /Applications/MAMP/htdocs/Site/node_modules/postcss-selector-parser/dist/selectors/container.js:173:31
        at Root.each (/Applications/MAMP/htdocs/Site/node_modules/postcss-selector-parser/dist/selectors/container.js:153:22)
        at Root.walk (/Applications/MAMP/htdocs/Site/node_modules/postcss-selector-parser/dist/selectors/container.js:169:21)
        at Processor.func (/Applications/MAMP/htdocs/Site/node_modules/postcss-merge-rules/dist/lib/ensureCompatibility.js:80:17)
        at Processor.process (/Applications/MAMP/htdocs/Site/node_modules/postcss-selector-parser/dist/processor.js:34:14)
        at /Applications/MAMP/htdocs/Site/node_modules/postcss-merge-rules/dist/lib/ensureCompatibility.js:121:12
        at Array.every (native)
        at ensureCompatibility (/Applications/MAMP/htdocs/Site/node_modules/postcss-merge-rules/dist/lib/ensureCompatibility.js:77:22)
        at canMerge (/Applications/MAMP/htdocs/Site/node_modules/postcss-merge-rules/dist/index.js:74:44)
        at /Applications/MAMP/htdocs/Site/node_modules/postcss-merge-rules/dist/index.js:222:24
        at /Applications/MAMP/htdocs/Site/node_modules/postcss/lib/container.js:241:28
        at /Applications/MAMP/htdocs/Site/node_modules/postcss/lib/container.js:148:26
        at Root.each (/Applications/MAMP/htdocs/Site/node_modules/postcss/lib/container.js:114:22)
        at Root.walk (/Applications/MAMP/htdocs/Site/node_modules/postcss/lib/container.js:147:21)
        at Root.walkRules (/Applications/MAMP/htdocs/Site/node_modules/postcss/lib/container.js:239:25)
        at /Applications/MAMP/htdocs/Site/node_modules/postcss-merge-rules/dist/index.js:274:13
        at LazyResult.run (/Applications/MAMP/htdocs/Site/node_modules/postcss/lib/lazy-result.js:276:20)
        at /Applications/MAMP/htdocs/Site/node_modules/postcss/lib/lazy-result.js:190:37
        at LazyResult.asyncTick (/Applications/MAMP/htdocs/Site/node_modules/postcss/lib/lazy-result.js:204:15)
        at /Applications/MAMP/htdocs/Site/node_modules/postcss/lib/lazy-result.js:202:27

If I remove "in AU" in the browserlist so it just reads "> 2%" everything compiles fine.

When you installed the node_modules, did you have the XCode Command Line Tools installed on your machine? If not, you can run xcode-select --install, then nuke node modules and run yarn again to see if that works.

I noticed yesterday http://browserl.ist/?q=%3E+2%25+in+AU was broken, taken the AU off and it worked again. Today it's fine.

Hmm I'm getting this on my end too.

I just checked and the latest stable release, v8.3.0 is still working fine. What is in master branch is WIP for the next milestone. I suspect once I get Webpack v2 working and use the latest CSS loader this will be resolved, see this clue: browserslist/browserslist#106 (comment).

Cheers dude. Is there any issue just listed > 2% in the browerlist file for now?

The worldwide browser stats are very different to that of developed countries, see the difference: http://browserl.ist/?q=%3E+2%25+in+AU vs http://browserl.ist/?q=%3E+2%25.

In Barebones v8.3.0 this will only affect the CSS vendor prefixes that get compiled. Soon Babel will tap into browserslist config too: #18.