edg-l / rustack

A fullstack web template for rust
MIT License
34 stars 5 forks source link

Unable to compile on windows? #1

Open shirshak55 opened 3 years ago

shirshak55 commented 3 years ago
quantum@quanta MINGW64 /d/Course/rustack (master)
$ cargo build --release
   Compiling rustack v1.0.0 (D:\Course\rustack)
   Compiling proc-macro2 v1.0.24
   Compiling winapi v0.3.9
   Compiling memchr v2.3.4
   Compiling log v0.4.14
   Compiling libc v0.2.92
   Compiling proc-macro-hack v0.5.19
   Compiling bitflags v1.2.1
   Compiling generic-array v0.14.4
   Compiling typenum v1.13.0
   Compiling tokio v1.4.0
   Compiling num-traits v0.2.14
error: failed to run custom build command for `rustack v1.0.0 (D:\Course\rustack)`

Caused by:
  process didn't exit successfully: `D:\Course\rustack\target\release\build\rustack-42c44a76fc49e4e3\build-script-build` (exit code: 101)
  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "The system cannot find the file
 specified." }', build.rs:7:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
edg-l commented 3 years ago

When you compile it, it runs yarn due to https://github.com/edg-l/rustack/blob/master/build.rs

Do you have yarn installed?

shirshak55 commented 3 years ago

@edg-l yea I do have yarn installed. But its v1. I hope its not yarn v2? Is it expecting yarn in system path or is it fine to use User path?

kelteseth commented 3 years ago

I have the same problem. I have the latest yarn installed and can call it manaully form the command line, but somehow the path in the build.rs is missing. @shirshak55 you can simply remove these lines and call yarn manually in the project directory. Command::new("yarn") .args(&["run", "build"]) .status() .unwrap();