weex从入门到放弃。。

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/qq_15345551/article/details/97824436

工作之余学习weex开发,记录下一些坑。。

附下weex的版本信息

问题一.版本不对应

报错如下:

E:\WeexProject\weext>weex debug tech_list.we
./tech_list.we
Module build failed: Error:

Vue packages version mismatch:

- [email protected] (C:\Users\kxf\.wx\modules\node_modules\[email protected]@vue\dist\vue.runtime.common.js)
- [email protected] (C:\Users\kxf\.wx\modules\node_modules\[email protected]@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.<anonymous> (C:\Users\kxf\.wx\modules\node_modules\[email protected]@vue-template-compiler\index.js:10:9)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787: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:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (C:\Users\kxf\.wx\modules\node_modules\[email protected]@weex-vue-loader\lib\parser.js:2:16)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787: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:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
 @ ./.temp/tech_list.js 3:17-44

 Try `weex doctor` command to fix this problem.

看提示是版本不对应,最后提示了 Try `weex doctor` command to fix this problem.执行下这个命令,还真可以了,如下

中间有个Android sdk目录的报错,应该是没设置到环境变量中,暂时先不管

附下更新后的版本信息

E:\WeexProject\weext>weex --version
2.0.0-beta.31 (Core 2.0.0-beta.31)
- @weex-cli/generator : v2.0.0-beta.16
- @weex-cli/debug : v2.0.0-beta.31
- @weex-cli/compile : v2.0.0-beta.27
- @weex-cli/doctor : v2.0.0-beta.20

问题二.

猜你喜欢

转载自blog.csdn.net/qq_15345551/article/details/97824436