Laravel-mix: [6.*] npx mix watch --hot gives Unknown argument

Created on 5 Dec 2020  路  4Comments  路  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 6.0.0-beta.15 (npm list --depth=0)
  • Node Version (node -v): 14.15.1
  • NPM Version (npm -v): 6.14.8
  • OS: windows

Description:

I get this error upon running the command

mix watch --hot
[webpack-cli] Unknown argument: --inline
[webpack-cli] Unknown argument: --disable-host-check

Steps To Reproduce:

npm install [email protected] -D
Then npx mix watch --hot

Most helpful comment

a temporary fix is to run: npm install webpack-dev-server, which will install the stable version for now, but as soon as the pull request is merged, you should remove webpack-dev-server from package.json and update to the latest laravel-mix release.

All 4 comments

I think I figured out the issue.
Review this merge https://github.com/JeffreyWay/laravel-mix/pull/2632
webpack-dev-server version 4.0.0-alpha removed both --inline and --disable-host-check flag
Please check their change log: https://github.com/webpack/webpack-dev-server/releases/tag/v4.0.0-beta.0

but what's the solution for laravel mix?

a temporary fix is to run: npm install webpack-dev-server, which will install the stable version for now, but as soon as the pull request is merged, you should remove webpack-dev-server from package.json and update to the latest laravel-mix release.

@oluwatosin-me thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jpmurray picture jpmurray  路  3Comments

kpilard picture kpilard  路  3Comments

sdebacker picture sdebacker  路  3Comments

rderimay picture rderimay  路  3Comments

stefensuhat picture stefensuhat  路  3Comments