Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock vue-template-compiler and vue version #13

Open
Val-istar-Guo opened this issue Nov 23, 2018 · 1 comment
Open

Lock vue-template-compiler and vue version #13

Val-istar-Guo opened this issue Nov 23, 2018 · 1 comment

Comments

@Val-istar-Guo
Copy link

考虑到weex是中国开发团队,我想我直接使用中文能更好的描述问题。

原因

vue-template-compiler 可以总下面的链接中看到,vue-template-compiler会检查当前版本和vue版本是否一致,如果不一致,则报错。weex-builder的npm-shrinkwrap.json文件中将vue-template-compiler锁定为 2.5.13。由于并未对vue版本进行限制,所以外部安装的vue依赖可能是其他版本。导致报错。在不看源码的情况下,此错误非常难以排查。

vue-template-compiler的依赖来源与weex-vue-loader这个依赖包。而weex-vue-loader 的lock中也没有限制vue的版本。

https://github.com/vuejs/vue/blob/1762a66204d4856e0725f09f12e4da16f403bf09/packages/vue-template-compiler/index.js#L7

解决方案

我认为较为简单的方案是,增加相关版本检测的报错提示、或将vue的版本也lock住。

@Val-istar-Guo
Copy link
Author

Val-istar-Guo commented Nov 23, 2018

我刚刚看了一下weex-vue-loader, package.json.lock中里面已经将vue纳入lock,版本均为2.5.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant