関連

Electron ビルド時

環境

  • MacOS Mojave

ログ

Unhandled rejection Error: Could not find "wine" on your system.

Wine is required to use the appCopyright, appVersion, buildVersion, icon, and
win32metadata parameters for Windows targets.

Make sure that the "wine" executable is in your PATH.

See https://github.com/electron-userland/electron-packager#building-windows-apps-from-non-windows-platforms for details.
    at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
    at onErrorNT (internal/child_process.js:407:16)

直す

文にあるように、以下の手順でwineをインストールします。

# Homebrew をインストール
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew cask install xquartz
# ...
# ==> Downloading https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg
# ...
# 🍺  xquartz was successfully installed!

brew install wine
# ...
# ==> Downloading https://homebrew.bintray.com/bottles/wine-3.0.4.sierra.bottle.tar.gz
# ...
# ==> Caveats
# You may also want winetricks:
#   brew install winetricks
# ==> Summary
# 🍺  /usr/local/Cellar/wine/3.0.4: 8,704 files, 633.5MB

以下のようにダイアログが建つかもなので、インストールしてください。

NODE_MODULE_VERSION 57. This version of Node.js requires NODE_MODULE_VERSION 59. Please try re-compiling or re-installing

rm -rf node_modulesして削除後、再度yarnでインストール

bcrypt 周りの場合

例えば以下のようなパターンの場合は、

Error: The module .../node_modules/bcrypt/lib/binding/bcrypt_11b.node
was compiled against a different Node.js version using
NODE_MODULE_VERSION 59. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing

以下で治りました。

npm rebuild bcrypt --update-binary

JavaScript で飯食べたい歴約 5 年、 純( nju33 ) によるノートサイトです。

このサイトではドリンク代や奨学金返済の為、広告などを貼らせて頂いてますがご了承ください。

Change Log