Skip to content
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

编译不过 #26

Closed
rock2022 opened this issue Aug 3, 2022 · 2 comments
Closed

编译不过 #26

rock2022 opened this issue Aug 3, 2022 · 2 comments

Comments

@rock2022
Copy link

rock2022 commented Aug 3, 2022

~/mining_proxy/src$ cargo build
Compiling mining_proxy v0.2.2 (/home/hashmap/mining_proxy)
error: failed to run custom build command for mining_proxy v0.2.2 (/home/hashmap/mining_proxy)

Caused by:
process didn't exit successfully: /home/hashmap/mining_proxy/target/debug/build/mining_proxy-f28fbf84d847eed0/build-script-build (exit status: 101)
--- stderr
Cannot execute npm install: Os { code: 2, kind: NotFound, message: "No such file or directory" }
thread 'main' panicked at 'called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', build.rs:27:10
stack backtrace:
0: rust_begin_unwind
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142:14
2: core::result::unwrap_failed
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/result.rs:1785:5
3: core::result::Result<T,E>::unwrap
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/result.rs:1078:23
4: build_script_build::main
at ./build.rs:25:5
5: core::ops::function::FnOnce::call_once
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

@YusongWang
Copy link
Owner

Cannot execute npm install: Os { code: 2, kind: NotFound, message: "No such file or directory" }
你需要安装nodejs.推荐lts版本的。
然后git clone https://github.com/YusongWang/mining_proxy_web.git
移动到rust目录项目中的mining_proxy这个目录。
重命名为web
然后进入web目录执行 yarn 或者mpm install.
npm结束之后,
回到跟目录再执行cargo build 就可以编译通过了。

@rock2022
Copy link
Author

rock2022 commented Aug 3, 2022

谢谢,编译成功。
附上版本如下:
~$ nodejs -v
v14.20.0
~$ npm -v
8.15.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants