2017-10-15 125 views
2

我用laravel 5.5,內置的WebPack模塊構建失敗:Vue的包版本不匹配

Module build failed: Error: 
Vue packages version mismatch: 
- [email protected] 
- [email protected] 
This may cause things to work incorrectly. Make sure to use the same version for both. 
If you are using [email protected]>=10.0, simply update vue-template-compiler. 
If you are using [email protected]<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest. 

有什麼不對?還有就是我的package.json

{ 
    "devDependencies": { 
     "cross-env": "^5.0.5", 
     "laravel-mix": "^1.5.0" 
    }, 
    "dependencies": { 
     "axios": "^0.16.2", 
     "bootbox": "^4.4.0", 
     "bootstrap": "^4.0.0-beta", 
     "font-awesome": "^4.7.0", 
     "jquery": "^3.2.1", 
     "lodash": "^4.17.4", 
     "marked": "^0.3.6", 
     "normalize.css": "^7.0.0", 
     "popper.js": "^1.12.5", 
     "vue": "^2.5.2", 
     "vue-loader": "^13.3.0", 
     "vue-localstorage": "^0.4.2", 
     "vue-markdown": "^2.2.4", 
     "vue-masked-input": "^0.5.2", 
     "vue-simplemde": "^0.4.5", 
     "vue-template-compiler": "^2.4.4", 
     "vue-upload-component": "^2.6.0-beta.3" 
    } 
} 

即使我改「VUE模板編譯」 2.5.2 - 它不是幫助

回答

0

重新安裝VUE裝載機或直接刪除node_modules文件夾,運行

NPM安裝

+0

node_modules刪除後,運行'npm install',沒有幫助 –

6

npm update --scripts-prepend-node-path=auto幫助

+0

我試過npm安裝,它沒有工作。我運行了上面的更新命令,它解決了我的問題。 – MrGood

+0

這對我有用。準確地描述它的作用是有用的。 – JoeGalind

+0

爲我工作..或者! –

0

使用Laravel 5.4 /的WebPack,我解決了這個有: 1)npm install vue-loader 2)npm install vue-template-compiler

0

只有乳寧npm install的問題得到解決。然後,npm run dev和一切都很好。