Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
383 views
in Technique[技术] by (71.8m points)

weex-toolkit 安装报错

安装到这步就进行不下去了;
? ~ sudo cnpm install -g weex-toolkit@beta
Password:
Downloading weex-toolkit to /usr/local/lib/node_modules/weex-toolkit_tmp
Copying /usr/local/lib/node_modules/weex-toolkit_tmp/.1.0.1-beta.6@weex-toolkit to /usr/local/lib/node_modules/weex-toolkit
Installing weex-toolkit's dependencies to /usr/local/lib/node_modules/weex-toolkit/node_modules
[1/9] opener@^1.4.1 installed at node_modules/.1.4.3@opener
[2/9] weex-components@^0.2.0 installed at node_modules/.0.2.0@weex-components
[3/9] chalk@^1.1.3 installed at node_modules/.1.1.3@chalk
[4/9] fs-extra@* installed at node_modules/.2.0.0@fs-extra
[5/9] yargs@^6.6.0 installed at node_modules/.6.6.0@yargs
[6/9] npmlog@^4.0.0 installed at node_modules/.4.0.2@npmlog
[7/9] xtoolkit@^0.1.7 installed at node_modules/.0.1.7@xtoolkit
[8/9] prompt@* installed at node_modules/.1.0.0@prompt
[email protected] download from binary mirror: {"module_name":"fse","module_path":"./lib/binding/{configuration}/{node_abi}-{platform}-{arch}/","remote_path":"./v{version}/","package_name":"{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz","host":"https://npm.taobao.org/mirrors/fsevents"}
[9/9] weex-previewer@^1.2.2 installed at node_modules/.1.3.4@weex-previewer
execute post install 4 scripts...
[1/4] scripts.postinstall [email protected] ? [email protected] ? [email protected] ? spawn-sync@^1.0.15 run "node postinstall"
[1/4] scripts.postinstall [email protected] ? [email protected] ? [email protected] ? spawn-sync@^1.0.15 finished in 94ms
[2/4] scripts.install [email protected] ? [email protected] ? [email protected] ? [email protected] ? [email protected] ? fsevents@^1.0.0 run "node install"
[fsevents] Success: "/usr/local/lib/node_modules/weex-toolkit/node_modules/.1.1.1@fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
[2/4] scripts.install [email protected] ? [email protected] ? [email protected] ? [email protected] ? [email protected] ? fsevents@^1.0.0 finished in 350ms
[3/4] scripts.postinstall weex-previewer@^1.2.2 run "node ./src/hook/post-install.js"
[3/4] scripts.postinstall weex-previewer@^1.2.2 finished in 197ms
[4/4] scripts.postinstall [email protected] run "xtoolkit install weex-builder"
/usr/local/lib/node_modules/weex-toolkit/node_modules/.0.1.7@xtoolkit/src/util/index.js:8

let args = ['install', name, '--loglevel=error'];
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/lib/node_modules/weex-toolkit/node_modules/.0.1.7@xtoolkit/bin/xtoolkit.js:6:14)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)

Install fail! Error: post install error, please remove node_modules before retry!
Run "sh -c xtoolkit install weex-builder" error, exit code 1
Error: post install error, please remove node_modules before retry!
Run "sh -c xtoolkit install weex-builder" error, exit code 1

at ChildProcess.<anonymous> (/usr/local/lib/node_modules/cnpm/node_modules/npminstall/node_modules/runscript/index.js:65:21)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

npminstall version: 2.26.2
npminstall args: /usr/local/bin/node /usr/local/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --china --userconfig=/Users/qiu_zhongqiang/.cnpmrc --disturl=https://npm.taobao.org/mirror... --registry=https://registry.npm.taobao.org -g weex-toolkit@beta


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

node.js 升级成最新的版本就好了。 报错的时候用的版本是 v4.x


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...