weex安装失败,按照官网步骤多次失败后成功

时间:2022-07-08 22:16:44

在安装Weex Toolkit之前,需要确保安装了node, npm.

yangfeifei:~ yff$ node -v
v6.10.2
yangfeifei:~ yff$ npm -v
3.10.10

然后按照官网安装Weex CLI:

npm install -g weex-toolkit

并确保版本号大于0.1.0:

安装完成之后,用weex命令验证是否成功

yangfeifei:~ yff$ weex

Usage: weex <foo/bar/we_file_or_dir_path>  [options]

选项:
--port http listening port number ,default is 8081 [默认值: 8081]
--wsport websocket listening port number ,default is 8082 [默认值: 8082]
--entry the entry file in a folder where <command> is one of: init create a vue project
debug start weex debugger
compile compile we/vue file
create create a weexpack project
platform <add|remove> <ios|android> add/remove ios/android platform
plugin <add|remove> <pluginName> add/remove weexplugin
run <ios|android> build your ios/android app and run weex <command> --help help on <command> yangfeifei:~ yff$ weex -v
v1.0.5
- weex-builder : v0.2.6
- weex-previewer : v1.3.7

weex命令报错之后,卸载,重装,一直不成功,多次尝试之后,成功