-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ViteX Exchange Wallet depends on this and fails to build. #39
Comments
Further info: It has some kind of add on: A Node.js C++ extension for SHA-3 (Keccak)This Node.js extension implements the SHA-3 (Keccak) cryptographic hashing algorithm. It is based on the reference C implementation, version 3.2. The exposed interface is almost identical to that of the InstallationVia $ npm install sha3 Via $ yarn add sha3 UsageKeccak supports 5 hash lengths: 224-bit, 256-bit, 384-bit, 512-bit and variable length. Variable length is not supported by this Node.js extension. Unless the user specifies otherwise, this Node.js extension assumes 512-bit. const SHA3 = require('sha3');
// Generate 512-bit digest.
let d = new SHA3.SHA3Hash();
d.update('foo');
d.digest('hex');
// => "1597842a..."
// Generate 224-bit digest.
d = new SHA3.SHA3Hash(224);
d.update('foo');
d.digest('hex');
// => "daa94da7..." new SHA3Hash([hashlen])This is the hash object. hash.update(data, [input_encoding])Updates the hash content with the given data, the encoding of which is given in hash.digest([encoding])Calculates the digest of all of the passed data to be hashed. The encoding can be Note: unlike Running the test suiteRun the test suite as follows: $ npm test The test suite is automatically generated from Keccak's reference test suite. WarningDo not use SHA-3 for hashing passwords. Do not even use SHA-3 + salt for hashing passwords. Use a slow hash instead. See also |
Not sure how to build software which uses different versions of python :( |
Ai tells me to use: npm install sha3@latest --python=C:\Python27\bin\python.exe Leading to: Maybe I have to do this for each package/module not sure yet: npm WARN While resolving: @babel/plugin-transform-block-scoped-functions@7.0.0-beta.53 npm ERR! A complete log of this run can be found in: C:\Users\skybu\AppData\Local\npm-cache_logs\2024-04-27T13_45_16_502Z-debug-0.log V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet>node --version |
The error is occurring because the In particular, the function expects an To fix this issue, you'll need to modify your code so that it uses the correct callback type when calling Here are a few possible solutions:
|
Looks you are using sha3, not js-sha3. You can go there and ask. |
error V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3
Output:
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3>if not defined npm_config_node_gyp (node "G:\Tools\NodeJS\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp@10.0.1
gyp info using node@20.12.2 | win32 | x64
gyp info find Python using Python version 3.12.2 found at "C:\Python312\python.exe"
gyp info find VS using VS2022 (17.8.34316.72) found at:
gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python312\python.exe
gyp info spawn args [
gyp info spawn args 'G:\Tools\NodeJS\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'G:\Tools\NodeJS\node_modules\npm\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\skybu\AppData\Local\node-gyp\Cache\20.12.2\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\skybu\AppData\Local\node-gyp\Cache\20.12.2',
gyp info spawn args '-Dnode_gyp_dir=G:\Tools\NodeJS\node_modules\npm\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\skybu\\AppData\\Local\\node-gyp\\Cache\\20.12.2\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args 'build\binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
addon.cpp
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan_callbacks.h(55,23): error C2039: 'AccessorSignature': is not a member of 'v8' [V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build\sha3.vcxproj]
(compiling source file '../src/addon.cpp')
C:\Users\skybu\AppData\Local\node-gyp\Cache\20.12.2\include\node\v8.h(71,11):
see declaration of 'v8'
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan_callbacks.h(55,23): error C2065: 'AccessorSignature': undeclared identifier [V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build\sha3.vcxproj]
(compiling source file '../src/addon.cpp')
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan_callbacks.h(55,13): error C2923: 'v8::Local': 'AccessorSignature' is not a valid template type argument for parameter 'T' [V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build\sha3.vcxproj]
(compiling source file '../src/addon.cpp')
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan_callbacks.h(55,23):
see declaration of 'AccessorSignature'
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan_callbacks.h(55,42): error C2955: 'v8::Local': use of class template requires template argument list [V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build\sha3.vcxproj]
(compiling source file '../src/addon.cpp')
C:\Users\skybu\AppData\Local\node-gyp\Cache\20.12.2\include\node\v8-local-handle.h(190,13):
see declaration of 'v8::Local'
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan.h(2444,14): error C2955: 'v8::Local': use of class template requires template argument list [V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build\sha3.vcxproj]
(compiling source file '../src/addon.cpp')
C:\Users\skybu\AppData\Local\node-gyp\Cache\20.12.2\include\node\v8-local-handle.h(190,13):
see declaration of 'v8::Local'
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan.h(2444,34): error C2641: cannot deduce template arguments for 'v8::Local' [V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build\sha3.vcxproj]
(compiling source file '../src/addon.cpp')
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan.h(2444,34): error C2780: 'v8::Local v8::Local(T *)': expects 1 arguments - 0 provided [V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build\sha3.vcxproj]
(compiling source file '../src/addon.cpp')
C:\Users\skybu\AppData\Local\node-gyp\Cache\20.12.2\include\node\v8-local-handle.h(331,3):
see declaration of 'v8::Local'
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan.h(2444,34): error C2780: 'v8::Local v8::Local(v8::Local
)': expects 1 arguments - 0 provided [V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build\sha3.vcxproj](compiling source file '../src/addon.cpp')
C:\Users\skybu\AppData\Local\node-gyp\Cache\20.12.2\include\node\v8-local-handle.h(195,3):
see declaration of 'v8::Local'
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan.h(2444,34): error C2783: 'v8::Local v8::Local(void)': could not deduce template argument for 'T' [V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build\sha3.vcxproj]
(compiling source file '../src/addon.cpp')
C:\Users\skybu\AppData\Local\node-gyp\Cache\20.12.2\include\node\v8-local-handle.h(192,3):
see declaration of 'v8::Local'
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan.h(2444,34): error C2780: 'v8::Local v8::Local(v8::Local)': expects 1 arguments - 0 provided [V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build\sha3.vcxproj]
(compiling source file '../src/addon.cpp')
C:\Users\skybu\AppData\Local\node-gyp\Cache\20.12.2\include\node\v8-local-handle.h(190,13):
see declaration of 'v8::Local'
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan.h(2470,6): error C2665: 'v8::ObjectTemplate::SetAccessor': no overloaded function could convert all the argument types [V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\build\sha3.vcxproj]
(compiling source file '../src/addon.cpp')
C:\Users\skybu\AppData\Local\node-gyp\Cache\20.12.2\include\node\v8-template.h(816,8):
could be 'void v8::ObjectTemplate::SetAccessor(v8::Localv8::Name,v8::AccessorNameGetterCallback,v8::AccessorNameSetterCallback,v8::Localv8::Value,v8::AccessControl,v8::PropertyAttribute,v8::SideEffectType,v8::SideEffectType)'
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan.h(2470,6):
'void v8::ObjectTemplate::SetAccessor(v8::Localv8::Name,v8::AccessorNameGetterCallback,v8::AccessorNameSetterCallback,v8::Localv8::Value,v8::AccessControl,v8::PropertyAttribute,v8::SideEffectType,v8::SideEffectType)': cannot convert argument 7 from 'Nan::imp::Sig' to 'v8::SideEffectType'
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan.h(2477,7):
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Users\skybu\AppData\Local\node-gyp\Cache\20.12.2\include\node\v8-template.h(809,8):
or 'void v8::ObjectTemplate::SetAccessor(v8::Localv8::String,v8::AccessorGetterCallback,v8::AccessorSetterCallback,v8::Localv8::Value,v8::AccessControl,v8::PropertyAttribute,v8::SideEffectType,v8::SideEffectType)'
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan.h(2470,6):
'void v8::ObjectTemplate::SetAccessor(v8::Localv8::String,v8::AccessorGetterCallback,v8::AccessorSetterCallback,v8::Localv8::Value,v8::AccessControl,v8::PropertyAttribute,v8::SideEffectType,v8::SideEffectType)': cannot convert argument 2 from 'Nan::imp::NativeGetter' to 'v8::AccessorGetterCallback'
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan.h(2472,7):
This conversion requires a reinterpret_cast, a C-style cast or parenthesized function-style cast
V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3\node_modules\nan\nan.h(2470,6):
while trying to match the argument list '(v8::Localv8::String, Nan::imp::NativeGetter, Nan::imp::NativeSetter, v8::Localv8::Object, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)'
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe
failed with exit code: 1gyp ERR! stack at ChildProcess. (G:\Tools\NodeJS\node_modules\npm\node_modules\node-gyp\lib\build.js:209:23)
gyp ERR! stack at ChildProcess.emit (node:events:518:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Windows_NT 10.0.22631
gyp ERR! command "G:\Tools\NodeJS\node.exe" "G:\Tools\NodeJS\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd V:\Worktrees\ViteXWallet\version-1.6.9\vite-web-wallet\node_modules\sha3
The text was updated successfully, but these errors were encountered: