rspc icon indicating copy to clipboard operation
rspc copied to clipboard

`create-rspc-app` build fails

Open mnpqraven opened this issue 1 year ago • 3 comments

I was checking out create-rspc-app to see quick scaffolding with PCR but got these errors where the first seems to be the build scripts not handling linux machines (I'm running linux)

❯ create-rspc-app


██████╗ ███████╗██████╗  ██████╗
██╔══██╗██╔════╝██╔══██╗██╔════╝
██████╔╝███████╗██████╔╝██║
██╔══██╗╚════██║██╔═══╝ ██║
██║  ██║███████║██║     ╚██████╗
╚═╝  ╚═╝╚══════╝╚═╝      ╚═════╝

✔ What will your project be called? · pnc-checklist-solid
✔ What backend framework would you like to use? · Tauri
✔ What database ORM would you like to use? · Prisma Client Rust
✔ What frontend framework would you like to use? · SolidJS
✔ What package manager would you like to use? · NPM
Generated project at '/home/othi/Repos/pnc-checklist-solid'
$ npm install
sh: /C: No such file or directory
Successfully installed npm packages
sh: /C: No such file or directory

when I cd into the folder and run cargo run the following errors show up

error: failed to run custom build command for `pnc-checklist-solid v0.1.0 (/home/othi/Repos/pnc-checklist-solid/src-tauri)`

Caused by:
  process didn't exit successfully: `/home/othi/Repos/pnc-checklist-solid/target/debug/build/pnc-checklist-solid-bd1fc19084e72f6c/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=TAURI_CONFIG
  cargo:rerun-if-changed=tauri.conf.json
  cargo:rustc-cfg=desktop
  This manifest requires workspace inheritance, but `inherit_workspace` hasn't been called yet

Tauri CLI also doesn't seem to get set up in package.json even if it's selected

mnpqraven avatar Feb 25 '23 08:02 mnpqraven

Also seeing this. Looks like it will be fixed on Tauri's end in v1.3 (not sure when that will be released): https://github.com/tauri-apps/tauri/issues/6252#issuecomment-1427571052

What has me perplexed is how @spacedriveapp are able to get past this issue. They seem to have a very similar setup to how create-rspc-app's Tauri/PCR template looks like, and clearly they're not having any issues with cargo build-ing or cargo run-ing 🤔

trymbill avatar Mar 08 '23 00:03 trymbill

Whoops, missed this issue.

It is definitely a problem in Tauri when using workspace = true in your Cargo.toml. You can replace workspace = true with version = "..." replacing it with the latest version of the crate and it will work.

Alternatively, you can import tauri-build from Git because they have fixed it there.

Spacedrive is just magic sometimes, idk why it's working.

It's very odd this issue wasn't caught earlier. I have been very busy but will try and find some time to update the create-rspc-app templates to fix this.

oscartbeaumont avatar Mar 08 '23 04:03 oscartbeaumont

Spacedrive is just magic sometimes

^ this 💯. Thanks for the suggestions, will try those out.

trymbill avatar Mar 08 '23 16:03 trymbill