Ajvanho's avatar
Level 14

TypeError: The 'compilation' argument must be an instance of Compilation

npm run dev suddenly stopped working???

[webpack-cli] TypeError: The 'compilation' argument must be an instance of Compilation

"vue-loader": "^15.9.6",
"vue-template-compiler": "^2.6.12"
"vue": "^2.6.12"

"laravel-mix": "^6.0.6",
0 likes
4 replies
devingray_'s avatar

What do your files look like?

Mix v6 package.json scripts should look like this:

"scripts": {
    "development": "mix",
    "watch": "mix watch",
    "watch-poll": "mix watch -- --watch-options-poll=1000",
    "hot": "mix watch --hot",
    "production": "mix --production"
}

And seeing that you are using Vue, in Mix v6 you need to tell mix that you will use Vue

mix.js('src/app.js', 'dist').vue();
1 like
lambro's avatar

My yarn isn't working either. Same error as npm

sooprano's avatar

try to remove node_modules and package-lock.json and retry npm i && npm run watch or dev

Please or to participate in this conversation.