[FIXED] When running "npm run dev" [webpack-cli] Error: Cannot find module 'vue/compiler-sfc' [Laravel with Vue.js]


after I installed vue.js on my laravel project and running npm run dev this error comes out.

enter image description here


I was having the same problem, basically what was happening is that my version of VUE did not match the version of vue-loader and vue-template-compiler

To solve it I just had to match the versions in package.json and npm install
here are the versions I’m using

"vue": "^2.6.11",
"vue-loader": "^15.9.6",
"vue-template-compiler": "^2.6.12",
"laravel-mix": "^6.0.6",

Answered By – Boutghat Oualid

Answer Checked By – Timothy Miller (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published