Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel mix vue-template-compiler must be installed as a peer dependency

i got a fresh laravel installation, everything compile well but when I install vuex or vue router through npm, compiling wont work anymore, i got this error:

Error: [vue-loader] vue-template-compiler must be installed as a peer dependency, or a compatible compiler implementation must be passed via options.

like image 427
Jose Santaella Avatar asked Dec 12 '18 05:12

Jose Santaella


1 Answers

The vue and vue-template-compiler module version must be the same in your package.json.

This was my code:

"devDependencies": {
    "vue": "^2.5.17",
    "vue-loader": "^15.5.1",
    "vue-template-compiler": "^2.5.21"
},

I changed the vue version to 2.5.21, then ran npm update to update the base version of VueJS.

like image 129
Davide Casiraghi Avatar answered Nov 01 '22 20:11

Davide Casiraghi