Laravel-mix: Mix incompatible with Webpack 2.3.0?

Created on 22 Mar 2017  路  9Comments  路  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 0.8.8
  • Node Version (node -v): 7.6.0
  • NPM Version (npm -v): 4.3.0
  • Yarn Version: 0.21.3
  • OS: Mac (Sierra)

Description:

It seems that mix is incompatible with the 2.3.0 release of webpack. I ran a yarn install --force to clean up my obsolete dependencies, which behind the curtains upgraded webpack to version 2.3.0
(just released a few minutes ago, https://github.com/webpack/webpack/releases/tag/v2.3.0).

The real problem is, that every fresh installation of mix will not work without rolling webpack back to a 2.2.x version (See reproduce steps).

Steps To Reproduce:

  1. Take a fresh laravel (mix) project
  2. yarn install
  3. node node_modules/webpack/bin/webpack.js -v should return 2.3.0
  4. npm run dev
  5. Fails with error:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.output.path: The provided value "public" is not an absolute path!

Most helpful comment

For anyone else wondering how to take advantage of that fix, you can edit your package.json and make sure your larave-mix version is 0.10 or higher:

  "laravel-mix": "^0.10.0",

Then run npm update.

All 9 comments

Second this, had to lock webpack to 2.2.1:

    "devDependencies": {
       ...
       "webpack": "2.2.1",
       "laravel-mix": "^0.8.1",
       ...
    }

For anyone else wondering how to take advantage of that fix, you can edit your package.json and make sure your larave-mix version is 0.10 or higher:

  "laravel-mix": "^0.10.0",

Then run npm update.

adding "laravel-mix": "^0.10.0" in package,json file fix the issue on my end

@orrd this worked for me - thanks!
@JeffreyWay - thanks for all the great work 馃槃

@orrd Thanks, you saved my day :)

Thank you, @orrd
using "laravel-mix": "^0.10.0", in package.json saved my day

@ibanjo You might want to try v1.0.3 now.

Thank you, @orrd
using "laravel-mix": "^0.10.0", in package.json saved my day too. :) 馃憤

Same here , this solved my issue too 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dtheb picture dtheb  路  3Comments

wendt88 picture wendt88  路  3Comments

terion-name picture terion-name  路  3Comments

kpilard picture kpilard  路  3Comments

RomainGoncalves picture RomainGoncalves  路  3Comments