Vue packages version mismatch: - vue@2.6.10 (D:\0527vue-admin-template\node_modules\vue\dist\vue.runtime.common.js) - vue-template-compiler@2.7.16 (D:\0527vue-admin-template\node_modules\vue-template-compiler\package.json) 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.
npm 查看vue-loader版本号:
npm list vue-loader
D:\0527vue-admin-template>npm list vue-loader npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. knife4j-vue@0.1.0 D:\hikvision_project\0527vue-admin-template `-- @vue/cli-service@4.5.19 `-- vue-loader@15.11.1
解决方案:package.json中更改vue-template-compiler与vue版本保持一致:
// 改之前: //dpendencies: "vue": "2.6.10", //devDependencies: "vue-template-compiler": "^2.6.14", // 改之后 //dpendencies: "vue": "2.6.10", //devDependencies: "vue-template-compiler": "2.6.10",
还没有评论,来说两句吧...