2017-10-15 50 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和一切都很好。