LoginSignup
0
1

More than 5 years have passed since last update.

headless な環境で electron --help してもなにもでないとき

Last updated at Posted at 2017-04-19

小ネタすぎて投稿するか迷ったんですけど同じ事でハマる人がいるかもしれないので。

Xが動いてなくて環境変数 DISPLAY が設定されてないと electorn は --help--version しても何も出してくれません。--enable-logging を付けると詳細なログが出てくるので、それで原因を調べましょう。

% node_modules/electron/dist/electron --enable-logging
[15542:0419/224954.661886:ERROR:browser_main_loop.cc(272)] Gtk: cannot open display: 

cannot open display なので、ヘルプを出すだけでも xvfb なりを使いましょうということですね。

他の原因で動かないときも --enable-logging すれば何か分かるかもしれないので、頭の片隅にでも入れておくといいでしょう。

参考

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1