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.

Module build failed: BrowserslistError: Unknown browser query `op_mini all`

See original GitHub issue

Hello Guys, I am receiving this error during webpack command for production build: “rimraf dist/* && webpack -p --bail --config ./etc/webpack.config.prod.js”

var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');

module.exports = {

    entry: {
        styles: ['./Client/styles.js'],
        jquery: ['./Client/jquery.js'],
        vendor: ['./Client/vendor.js'],
        app: [
            './CommonResources/Common/sharedModule.js',
            './Client/app.ts'
        ]
    },

    output: {
        path: path.resolve(__dirname + '/../dist'),
        filename: '[name].bundle.js',
        publicPath: '/dist/'
    },

    resolve: {
        alias: {
            cdn: path.resolve(__dirname + '/../CommonResources')
        }
    },

    plugins: [
        new ExtractTextPlugin({
            filename: '[name].bundle.css',
            allChunks: true
        })
    ],

    module: {
        loaders: [
            {
                test: /\.tsx?$/,
                loaders: ['awesome-typescript-loader'],
                exclude: /node_modules/
            },
            {
                test: /\.js$/,
                exclude: /node_modules|modernizr.custom.js|kendo.all.min.js|ipreo.common.docViewer.min.js|jszip.min.js|pdf.js|pdf.worker.js/,
                loader: 'babel-loader',
                query: {
                    presets: ['es2015']
                }
            },
            {
              test: /\.html$/,
              loader: 'html-loader'
            },
            {
                test: /\.less$/,
                loader: ExtractTextPlugin.extract({
                    fallback: 'style-loader',
                    use: ['css-loader?importLoaders=1', 'postcss-loader', 'less-loader']
                })
            },
            {
                test: /\.css$/,
                loader: ExtractTextPlugin.extract({
                    fallback: 'style-loader',
                    use: ['css-loader?importLoaders=1!', 'postcss-loader']
                })
            }
        ]
    }
};

ERROR in .//css-loader?importLoaders=1!.//postcss-loader!./~/less-loader!./Client/myComponent.less Module build failed: BrowserslistError: Unknown browser query op_mini all at error (C:\Web\node_modules\browserslist\index.js:23:15) at C:\Web\node_modules\browserslist\index.js:123:13 at Array.forEach (native) at browserslist (C:\Web\node_modules\browserslist\index.js:95:16) at isSupported (C:\Web\node_modules\caniuse-api\dist\index.js:66:37) at C:\Web\node_modules\postcss-merge-rules\dist\lib\ensureCompatibility.js:95:66 at C:\Web\node_modules\postcss-selector-parser\dist\selectors\container.js:170:26 at Selector.each (C:\Web\node_modules\postcss-selector-parser\dist\selectors\container.js:153:22) at Selector.walk (C:\Web\node_modules\postcss-selector-parser\dist\selectors\container.js:169:21) at C:\Web\node_modules\postcss-selector-parser\dist\selectors\container.js:173:31 at Root.each (C:\Web\node_modules\postcss-selector-parser\dist\selectors\container.js:153:22) at Root.walk (C:\Web\node_modules\postcss-selector-parser\dist\selectors\container.js:169:21) at Processor.func (C:\Web\node_modules\postcss-merge-rules\dist\lib\ensureCompatibility.js:88:17) at Processor.process (C:\Web\node_modules\postcss-selector-parser\dist\processor.js:34:14) at C:\Web\node_modules\postcss-merge-rules\dist\lib\ensureCompatibility.js:134:12 at Array.every (native) at ensureCompatibility (C:\Web\node_modules\postcss-merge-rules\dist\lib\ensureCompatibility.js:79:22) at canMerge (C:\Web\node_modules\postcss-merge-rules\dist\index.js:72:44) at C:\Web\node_modules\postcss-merge-rules\dist\index.js:220:24 at C:\Web\node_modules\postcss\lib\container.es6:199:28 at C:\Web\node_modules\postcss\lib\container.es6:110:26 at Root.each (C:\Web\node_modules\postcss\lib\container.es6:78:22) at Root.walk (C:\Web\node_modules\postcss\lib\container.es6:109:21) at Root.walkRules (C:\Web\node_modules\postcss\lib\container.es6:197:25) at C:\Web\node_modules\postcss-merge-rules\dist\index.js:267:13 at LazyResult.run (C:\Web\node_modules\postcss\lib\lazy-result.es6:321:20) at LazyResult.asyncTick (C:\Web\node_modules\postcss\lib\lazy-result.es6:248:32) at LazyResult.asyncTick (C:\Web\node_modules\postcss\lib\lazy-result.es6:260:22) at LazyResult.asyncTick (C:\Web\node_modules\postcss\lib\lazy-result.es6:260:22) at LazyResult.asyncTick (C:\Web\node_modules\postcss\lib\lazy-result.es6:260:22)

and it works fine when running webpack without “-p” key

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aicommented, Mar 9, 2017

Also I highly recommend to move browsers lost to browserslist key in package.json. In Autoprefixer twitter I show many cases, when browsers option will not work.

0reactions
kolesnikcommented, Mar 9, 2017

You are right it was old “babel-plugin-react-autoprefix” dependency. Now I am good. Thank you a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unknown browser query `dead` in React/Express App - Stack ...
I just got this when I tried to do a production build of my app. Looks like it is an issue with the...
Read more >
Unknown browser query `dead`” #React #npm | Mixster
Sovling the browserlist error in ReactJS, angular, nodejs, ... [Solved] “Module build failed: BrowserslistError: Unknown browser query ...
Read more >
Module build failed: BrowserslistError: Unknown browser ...
It happpens because of old cssnano (it uses old Browserslist without dead query). We are triting to release cssnano 4 (with new Browserslist) ......
Read more >
CHANGELOG.md - Renovate Bot Package Diff
Fix `Unknown version 11 of Node.js` error (by Dan Onoshko). ... Fix excluding Opera Mini and other browsers with `all` version.
Read more >
Browserslist on Twitter: "If you have “BrowserslistError ...
[Solved] “Module build failed: BrowserslistError: Unknown browser query `dead`” #React #npm. Sovling the browserlist error in ReactJS, ...
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