[vue] Vue packages version mismatch 报错解决方法

在用vue-cli创建project时,

vue create project

出现了vue packages version mismatch的报错

/usr/local/lib/node_modules/@vue/cli/node_modules/vue-template-compiler/index.js:10
  throw new Error(
  ^

Error: 

Vue packages version mismatch:

- [email protected] (/node_modules/vue/dist/vue.runtime.common.js)
- [email protected] (/usr/local/lib/node_modules/@vue/cli/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.

    at Object. (/usr/local/lib/node_modules/@vue/cli/node_modules/vue-template-compiler/index.js:10:9)
    at Module._compile (internal/modules/cjs/l

你可能感兴趣的:(vue,报错与解决)