[Electron v1.1.0] Windows起動できなく対処

2 min read
Electron
hiroweb developer

環境

  • electron v1.1.0
  • Windows 7

状況(エラー)

electron .を実行すると以下の様なエラーが発生した。

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\hiro\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.2.0
npm ERR! npm  v3.9.0
npm ERR! code ELIFECYCLE
npm ERR! hoge@1.1.0 start: `electron .`
npm ERR! Exit status 3221225781
npm ERR!
npm ERR! Failed at the hoge@1.1.0 start script 'electron .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the hoge package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs hoge
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls hoge
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\workspace\hoge\npm-debug.log

確認

Node.js のアップデートと再インストール

アップデートと再インストールをしてみたが、特に変化なし。

electronを確認してみる

electron v1.1.0 の Release Note を確認してみると以下の様な記述があった。

Windows

  • Use Visual Studio 2015 for building.

何やらVS2015を使い始めたらしい。

再頒布可能パッケージをインストールする

Visual Studio 2015 の Visual C++ 再頒布可能パッケージをインストールする。

インストールが完了して、再びelectron .を実行してみると、エラーは解消されていた。