鍍金池/ 問答/HTML/ Weex 開發(fā)環(huán)境安裝失敗

Weex 開發(fā)環(huán)境安裝失敗

安裝時報錯

$ yarn global add weex-toolkit
yarn global v1.2.1
[1/4] Resolving packages...
warning weex-toolkit > weex-builder > babel-preset-es2015@6.24.1: ?  Thanks f
or using Babel: we recommend using babel-preset-env now: please read babeljs.io/
env to update!
warning weex-toolkit > xtoolkit > dns > winston > request > node-uuid@1.4.8: Use
 uuid module instead
[2/4] Fetching packages...
error hawk@0.10.2: The engine "node" is incompatible with this module. Expected
version "0.8.x".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this c
ommand.

但是能正常初始化

$ weex -v
   v1.2.9
 - weexpack : v1.0.15
 - weex-builder : v0.3.14
 - weex-previewer : v1.4.6

$ weex create weex-test
? Project name (weex-test)
? Project name weex-test
? Project description (A weex project)
? Project description A weex project
? Project version (1.0.0)
? Project version 1.0.0
? Project author (xx)
? Project author xx
? Set up unit tests? (Y/n)
? Set up unit tests? Yes
? Should we run `npm install` for you after the project has been created? no

Success! Created weex-test at F:\weex\weex-test

添加平臺時

$ weex platform add android

  error: unknown option `--telemetry'

請問如何解決?

本機環(huán)境

  • Win10 64
  • node 8.9.3
回答
編輯回答
笨笨噠

weex platform add anroid ---> android 吧

2018年3月6日 07:36
編輯回答
空白格

我也遇到這個問題,官方文檔簡單的不能再簡單了,使用說明也少,坑不是一般多

2018年7月9日 16:51
編輯回答
凹凸曼

用yarn出現(xiàn)同樣的問題,用npm反而沒有出現(xiàn)

2017年7月17日 03:26
編輯回答
旖襯

這個問題我也遇到了,我的解決辦法是:

  1. 先安裝 weexpack:cnpm install -g weexpack
  2. 然后根據(jù)提示,更新weexpack到1.0.18: weex update weexpack@1.0.18
  3. weex platform add ios 成功!
2018年7月4日 04:57