everx-labs/ever-sdk-js

node-gyp should be installed before cargo run (win32)

Closed this issue · 2 comments

d3p commented
   Compiling ton_client_node_addon v1.2.0 (C:\Users\User\tonlabs\ton-client-js\packages\lib-node\lib)
    Finished release [optimized] target(s) in 6m 46s
Add package file: lib/tonclient.lib
"node-gyp" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 3, kind: NotFound, message: "Системе не удается найти указанный путь." }', C:\Users\User\tonlabs\ton-client-js\build\src\lib.rs:98:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `C:\Users\User\tonlabs\ton-client-js\target\debug\ton_client_node_build.exe` (exit code: 101)
d3p commented

Fixed by npm install -g node-gyp

d3p commented

https://github.com/nodejs/node-gyp#on-windows
Possible solution to fix in code:
change here https://github.com/tonlabs/ton-client-js/blob/master/packages/lib-node/build/src/main.rs#L22
to: npm run build and add node-gyp as devDependencies