weex從入門到放棄。。

工作之餘學習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

問題二.Template block is required

執行完一里面的操作後,繼續執行weex debug tech_list.we 報錯

E:\WeexProject\weext>weex debug tech_list.we
./tech_list.we
(Emitted value instead of an instance of Error) Template block is required
NonErrorEmittedError: (Emitted value instead of an instance of Error) Template block is required
    at Object.emitError (C:\Users\kxf\.wx\modules\node_modules\[email protected]@webpack\lib\NormalModule.js:122:14)
    at Object.loader (C:\Users\kxf\.wx\modules\node_modules\[email protected]@weex-loader\lib\loader.js:282:10)
 @ ./.temp/tech_list.js 3:17-44

 

一波三折,明天還要搬磚,只能明天晚上再看

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章