I was trying to use Vue with Laravel 8 while running running npm run dev, encountered following error.ย
package.json
"laravel-mix": "^6.0.10",
"vue-loader": "^15.9.6",
"vue-template-compiler": "^2.6.12",
"vue": "^2.6.12"
To resolve this issue, I updated webpack.mix.js & app.js with following.
webpack.mix.js
mix.js('resources/js/app.js', 'public/js').vue({ version: 2 });
app.js
window.Vue = require('vue').default;
These changes should resolve the problem.