Zilliqa/zilliqa-js

NPM i @zilliqa-js/crypto fails - requires 5GB C++ tool from 2015?

VexyCats opened this issue · 0 comments

Describe the bug
running NPM i @zilliqa-js/crypto on a new project/empty directory displays this in the terminal.

PS C:\......\Lambda Functions\aws\DownloadPAyloads> npm i @zilliqa-js/crypto        

> sodium@3.0.2 preinstall C:\......\Lambda Functions\aws\DownloadPAyloads\node_modules\sodium
> node install.js --preinstall

MS Version: 2015
Preinstall Mode
Download libsodium.lib
MS Version: 2015
Platform Tool is v140
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/x64/Release/v140/dynamic/libsodium.dll
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/x64/Release/v140/dynamic/libsodium.exp
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/x64/Release/v140/dynamic/libsodium.lib
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/x64/Release/v140/dynamic/libsodium.pdb
Libs for version v140 downloaded.
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/core.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_aead_aes256gcm.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_aead_chacha20poly1305.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_aead_xchacha20poly1305.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_auth.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_auth_hmacsha256.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_auth_hmacsha512.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_auth_hmacsha512256.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_box.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_box_curve25519xchacha20poly1305.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_box_curve25519xsalsa20poly1305.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_core_ed25519.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_core_hchacha20.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_core_hsalsa20.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_core_salsa20.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_core_salsa2012.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_core_salsa208.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_generichash.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_generichash_blake2b.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_hash.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_hash_sha256.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_hash_sha512.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_kdf.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_kdf_blake2b.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_kx.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_onetimeauth.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_onetimeauth_poly1305.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_pwhash.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_pwhash_argon2i.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_pwhash_argon2id.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_pwhash_scryptsalsa208sha256.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_scalarmult.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_scalarmult_curve25519.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_scalarmult_ed25519.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_secretbox.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_secretbox_xchacha20poly1305.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_secretbox_xsalsa20poly1305.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_secretstream_xchacha20poly1305.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_shorthash.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_shorthash_siphash24.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_sign.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_sign_ed25519.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_sign_edwards25519sha512batch.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream_chacha20.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream_salsa20.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream_salsa2012.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream_salsa208.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream_xchacha20.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream_xsalsa20.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_verify_16.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_verify_32.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_verify_64.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/export.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/randombytes.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/randombytes_salsa20_random.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/randombytes_sysrandom.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/runtime.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/utils.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/version.h
Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium.h
Include files downloaded.
Prebuild steps completed. Binary libsodium distribution installed in ./deps/build

> sodium@3.0.2 install C:\......\Lambda Functions\aws\DownloadPAyloads\node_modules\sodium
> node install.js --install

MS Version: 2015
Install Mode

C:\......\Lambda Functions\aws\DownloadPAyloads\node_modules\sodium>if not defined npm_config_node_gyp (node "C:\...AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\...AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" 
rebuild )
gyp ERR! find VS 
gyp ERR! find VS msvs_version was set from command line or npm config
gyp ERR! find VS - looking for Visual Studio version 2015
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS checking VS2017 (15.9.28307.665) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - found VC++ toolset: v141
gyp ERR! find VS - found Windows SDK: 10.0.17763.0
gyp ERR! find VS - msvs_version does not match this version
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS valid versions for msvs_version:
gyp ERR! find VS - "2017"
gyp ERR! find VS - "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:\...AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at findVisualStudio2013 (C:\...AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16)
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\...AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:344:14)
gyp ERR! stack     at findVisualStudio2015 (C:\...AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14)
gyp ERR! stack     at regSearchKeys (C:\...AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:365:16)
gyp ERR! stack     at regGetValue (C:\...AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7)
gyp ERR! stack     at C:\...AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:301:5)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Spader\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\......\Lambda Functions\aws\DownloadPAyloads\node_modules\sodium
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
C:\......\Lambda Functions\aws\DownloadPAyloads\node_modules\sodium\install.js:293
            throw new Error(cmdLine + ' exited with code ' + code);
            ^

    at ChildProcess.<anonymous> (C:\......\Lambda Functions\aws\DownloadPAyloads\node_modules\sodium\install.js:293:19)
    at ChildProcess.emit (events.js:189:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm WARN downloadpayloads@1.0.0 No description
npm WARN downloadpayloads@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sodium@3.0.2 install: `node install.js --install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sodium@3.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\...AppData\Roaming\npm-cache\_logs\2020-07-20T14_38_26_002Z-debug.log

Expected behavior
To install the package.

Desktop (please complete the following information):
Windows 10.

VS code 2019.

Additional context
Tried running these commands, both failed to do any change:

npm config set msvs_version 2015
npm config set msvs_version 2017

Stackoverflow says node-gyp requires a 2015 C++ development tool set thats 5GB.... Seems like this shouldn't be required to just install this package?