Weex 开发环境安装失败

安装时报错

$ 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'

请问如何解决?

本机环境

  • Win10 64
  • node 8.9.3
阅读 4.7k
4 个回答

这个问题我也遇到了,我的解决办法是:

  1. 先安装 weexpack:cnpm install -g weexpack
  2. 然后根据提示,更新weexpack到1.0.18: weex update weexpack@1.0.18
  3. weex platform add ios 成功!

weex platform add anroid ---> android 吧

新手上路,请多包涵

我也遇到这个问题,官方文档简单的不能再简单了,使用说明也少,坑不是一般多

新手上路,请多包涵

用yarn出现同样的问题,用npm反而没有出现

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题