[FIXED] Error : vue-loader requires @vue/compiler-sfc to be present in the dependency tree

Issue

I’m getting this error when I’m trying to do

npm run serve

I have tried npm update sudo npm serve. It didn’t work.
I also tried deleting the package-lock.json file and doing npm install after that, and that too didn’t work. I also downgraded the version of the vue-loader to 15.9.2 and that also didn’t work

Solution

Actually, you are missing the library so you just have to install it with

npm i @vue/compiler-sfc

Answered By – Abdulrahman Falyoun

Answer Checked By – Mildred Charles (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published