今天拉取了一个vue项目,npm run dev报错如下:

Vue packages version mismatch:

- vue@2.6.14 (D:\xxx\workProjects\code\xxx-console-ui-2.0\node_modules\vue\dist\vue.runtime.common.js)
- vue-template-compiler@2.7.8 (D:\xxx\workProjects\code\xxx-console-ui-2.0\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.

解决方案:
package.json中的版本号改为2.6.14

{
  "name": "vue-template-compiler",
  "version": "2.6.14",
  ......
Logo

前往低代码交流专区

更多推荐