Tencent / wepy

小程序组件化开发框架
https://wepyjs.gitee.io/wepy-docs/
Other
22.56k stars 3.05k forks source link

wepy init后build watch报错 #2363

Open zyh-akk opened 5 years ago

zyh-akk commented 5 years ago

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

Error:

Vue packages version mismatch:

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.<anonymous> (/usr/local/lib/node_modules/@wepy/cli/node_modules/vue-template-compiler/index.js:10:9)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/lib/node_modules/@wepy/cli/core/plugins/parser/wpy.js:9:21)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)

我本地vue版本是3.6.2

Longgererer commented 5 years ago

I have the same question, it seems like vue version dose not match vue-template-compiler version, but I haven't solved it yet.

Longgererer commented 5 years ago

I solved this problem! Vue version must be same as vue-template-compiler version, you can try to run :

npm update vue -g

update vue version to 2.6.10