https://linen.dev logo
Error when running deploying on Windows [Resolved]
# help
w
I am trying to create a discord bot using Shuttle & serenity but when I do
cargo shuttle run
or
cargo shuttle deploy
I get the following error.
Copy code
rs
error: couldn't read \\?\E:\Projects\rust-discord-bot\target\debug\build\mime_guess-3fb2e0832d29adb3\out/mime_types_generated.rs: The filename, directory name, or volume label syntax is incorrect. (os error 123)
 --> C:\Users\Liam\.cargo\registry\src\github.com-1ecc6299db9ec823\mime_guess-2.0.4\src\impl_bin_search.rs:4:1
  |
4 | include!(concat!(env!("OUT_DIR"), "/mime_types_generated.rs"));
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

error: could not compile `mime_guess` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
Error: 1 job failed
I tried fist with my own project then I tried with the weather bot example and got the exact same error Weather bot https://www.github.com/kaleidawave/discord-weather-bot What am I doing wrong?
k
Hey! You're probably not doing anything wrong, this is caused by a bug in cargo when building certain crates on windows. We have an issue for this on github with a few possible workarounds: https://github.com/shuttle-hq/shuttle/issues/258
w
Running
cargo build
before
deploy
or
run
worked for me, thanks for the help!
k
Nice! Have fun 🥳