-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Hii
I have tried your example in the repo but unfortunately, I got an error.
I changed the code a bit but it should be working fine.
` var rx = require('./build/Release/addon');
let key = "0410591dc8b3bba89f949212982f05deeb4a1947e939c62679dfc7610c62";
let blob = "58249adafb690683a800ee8d6556e2a7d25864d577afbf709ceff9e3bdd5ebae";
let vm;
async function hashing(){
console.log("Starting RandomX virtual machine...");
try{
vm = await rx.RandomxVM(key, ["jit", "ssse3"]);
console.log('started?')
}
catch(e){
console.log(e);
return 0;
}
console.log("Start hashing...");
let hash = rx.hash(vm, blob);
console.log("hash: " + hash);
}
hashing();`
`
Without the async function en your clean example
Starting RandomX virtual machine...
And then the file ends.
Node debug
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm@6.14.6
3 info using node@v12.18.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle node-randomx@1.0.0prestart: node-randomx@1.0.0start: node-randomx@1.0.0
6 info lifecycle node-randomx@1.0.0
7 verbose lifecycle node-randomx@1.0.0start: unsafe-perm in lifecycle truestart: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\User\Documents\RandomX\node-randomx\node_modules.bin;C:\Program Files (x86)\VMware\VMware Workstation\bin;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\nodejs;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\OpenSSL-Win64\bin\openssl.cfg;C:\Program Files\dotnet;C:\Program Files\Git\cmd;C:\Program Files\CMake\bin;C:\Program Files (x86)\GnuWin32\bin;C:\Users\User.windows-build-tools\python27;C:\Users\User\AppData\Local\Programs\Python\Python39-32\Scripts;C:\Users\User\AppData\Local\Programs\Python\Python39-32;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Users\User\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\User\AppData\Roaming\npm;C:\Users\User\AppData\Local\GitHubDesktop\bin;C:\Users\User.dotnet\tools
8 verbose lifecycle node-randomx@1.0.0
9 verbose lifecycle node-randomx@1.0.0start: CWD: C:\Users\User\Documents\RandomX\node-randomxstart: Args: [ '/d /s /c', 'node example.js' ]
10 silly lifecycle node-randomx@1.0.0
11 silly lifecycle node-randomx@1.0.0start: Returned: code: 3221225477 signal: nullstart: Failed to exec start script
12 info lifecycle node-randomx@1.0.0
13 verbose stack Error: node-randomx@1.0.0 start: node example.js
13 verbose stack Exit status 3221225477
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid node-randomx@1.0.0
15 verbose cwd C:\Users\User\Documents\RandomX\node-randomx
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
18 verbose node v12.18.3
19 verbose npm v6.14.6
20 error code ELIFECYCLE
21 error errno 3221225477
22 error node-randomx@1.0.0 start: node example.js
22 error Exit status 3221225477
23 error Failed at the node-randomx@1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225477, true ]
Error
Starting RandomX virtual machine...
npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! node-randomx@1.0.0 start: node example.js
npm ERR! Exit status 3221225477
npm ERR!
npm ERR! Failed at the node-randomx@1.0.0 start 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: