我正在尝试在 Electron 中使用node-webcrypto-ossl,它需要openssl库并将文件夹包含在binding.gyp中。
我尝试将其包含在目标中
targets": [
{
"include_dirs": [
"<!(node -e \"require('nan')\")",
"<(openssl_dir)/include",
"/path/to/homebrew/openssl/lib",
"/path/to/homebrew/openssl/include"
],
但是没有成功
最佳答案
在我的 .npmrc 中,我只指定 OpenSSL 目录:
runtime = electron
target = 1.6.11
target_arch = x64
disturl = https://atom.io/download/atom-shell
openssl_dir = /usr/local/ssl
并且我能够构建使用 node-webcrypto-ossl 的 Electron 应用程序
关于 Electron 在building.gyp中包含openssl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45379239/