Update to 2.1.0-beta.25 causes parseQuery should get a string as first argument

I’m submitting a bug report

Webpack version:

Please tell us about your environment:
Windows 10

Current behavior:
I recently upgraded to webpack 2 beta 25 from beta 20. In beta 20, my entire configuration worked and the compilation worked. Upgrading to webpack 25 causes this error:


I’m running the compiler script using babel-node.

import webpack from 'webpack';
import _debug from 'debug';

const debug = _debug('build:webpack-compiler');
  chunks: false,
  chunkModules: false,
  colors: true,

export default function webpackCompiler(webpackConfig, statsFormat = DEFAULT_STATS_FORMAT) {
  return new Promise((resolve, reject) => {
    const compiler = webpack(webpackConfig);

    /* eslint-disable consistent-return */
    compiler.run((err, stats) => {
      if (err) {
        debug('Webpack compiler encountered a fatal error.', err);
        return reject(err);

      const jsonStats = stats.toJson();
      debug('Webpack compile completed.');

      if (jsonStats.errors.length > 0) {
        debug('Webpack compiler encountered errors.');
        return reject(new Error('Webpack compiler encountered errors'));
      } else if (jsonStats.warnings.length > 0) {
        debug('Webpack compiler encountered warnings.');
      } else {
        debug('No errors or warnings encountered.');
  • Language: [all | TypeScript X.X | ES6/7 | ES5 | Dart | …]

Author: Fantashit

2 thoughts on “Update to 2.1.0-beta.25 causes parseQuery should get a string as first argument

  1. There is old loader-utils in webpack’s package.json “loader-utils”: “^0.2.11”
    But only latest 0.2.16 is now compatible with webpack 2. For some reason it didn’t updated.
    Short fix:
    npm i loader-utils

Comments are closed.