- npm run dev 時報錯:
ERROR in ./resources/assets/js/components/steps.vue Module Error (from ./node_modules/vue-loader/lib/index.js): Vue packages version mismatch: - vue@2.6.5 - vue-template-compiler@2.6.6 This may cause things to work incorrectly. Make sure to use the same version for both. If you are using vue-loader@>=10.0, simply update vue-template-compiler. If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest. @ ./resources/assets/js/app.js 12:13-46 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ERROR in ./resources/assets/js/components/steps.vue Module build failed (from ./node_modules/vue-loader/lib/index.js): TypeError: Cannot read property 'parseComponent' of undefined at parse (/home/vagrant/Code/Taskmanager/node_modules/@vue/component-compiler-utils/dist/parse.js:14:23) at Object.module.exports (/home/vagrant/Code/Taskmanager/node_modules/vue-loader/lib/index.js:67:22) @ ./resources/assets/js/app.js 12:13-46 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss
在 package.json
檔案中同一一下版本:
"dependencies": {
"vue": "2.5.21",
"vue-template-compiler": "2.5.21"
}
再 npm install
npm update
就解決了。
本作品採用《CC 協議》,轉載必須註明作者和本文連結