Open paulyu12 opened 2 years ago
Not sure what to do about this, I don't use Windows, and don't have VS2017 Pro. I'm using node-gyp which is supposed to make things like these cross-platform. binding.gyp
has this part for Windows:
# "openssl_root" is the directory on Windows of the OpenSSL files
['target_arch=="x64"', {
'variables': {
'openssl_root%': 'C:/OpenSSL-Win64'
},
'libraries': ['<(openssl_root)/lib/<!@(dir /B C:\OpenSSL-Win64\lib\libeay32.lib C:\OpenSSL-Win64\lib\libcrypto.lib)'],
}, {
'variables': {
'openssl_root%': 'C:/OpenSSL-Win32'
},
'libraries': ['<(openssl_root)/lib/<!@(dir /B C:\OpenSSL-Win32\lib\libeay32.lib C:\OpenSSL-Win32\lib\libcrypto.lib)'],
}],
Do you have these OpenSSL files in their expected places?
me too, install failed
Traceback (most recent call last):
File "C:\soft\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 50, in gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\soft\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\soft\nodejs\node.exe" "C:\soft\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\work\web_projects_2\uh-rdsp-meal-ticket-api\node_modules\node-aes-gcm
gyp ERR! node -v v14.17.6
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
@xorbit hello Can you help me solve the problem?
As I mentioned above, I don't have Windows to try it on, sorry. Not sure if @paulyu12 ever solved his problem and may be able to share a solution?
try npm install node-aes-gcm --unsafe-perm
@Freedomhxb @paulyu12 I also failed to install it at the beginning. Later, I installed OpenSSL to C:\OpenSSL-Win64, and the installation was successful
@Freedomhxb @paulyu12 I also failed to install it at the beginning. Later, I installed OpenSSL to C:\OpenSSL-Win64, and the installation was successful
I used the following solution to encrypt/decrypt. I'm not sure whether it helps or not.
Thank you for posting the example @paulyu12! While I try to keep this package usable for those who have it integrated in their software, it was mostly a crutch to deal with the lack of support for GCM in node's crypto module at the time when I created it. Now the crypto module supports GCM, it would be best to migrate to that.
npm install node-aes-gcm error. node v14.16.0 Windows 10 OpenSSL 1.1.1h