smaug
smaug copied to clipboard
thread 'main' panicked at 'Could not create canonical path:
Help help! :)
I have an existing largisth DR project and did a smaug init and that worked fine. Did smaug run and got the following error. Smaug run works fine on other projects.
Also, the discord invite link on your website didn't work for me.
RUST_BACKTRACE=full smaug run
thread 'main' panicked at 'Could not create canonical path: Os { code: 2, kind: NotFound, message: "No such file or directory" }', cli/src/commands/run.rs:71:51
stack backtrace:
0: 0x10925e9da - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h533490cb0144b9ac
1: 0x10928ea5b - core::fmt::write::hd6db5571778cce6c
2: 0x10924f66a - std::io::Write::write_fmt::h3b731249d14dbbaf
3: 0x109255e15 - std::panicking::default_hook::{{closure}}::h47e90b77f003c5b7
4: 0x1092559ee - std::panicking::default_hook::ha5ca508e09960444
5: 0x10925641a - std::panicking::rust_panic_with_hook::hc8381a31241f686e
6: 0x10925efde - std::panicking::begin_panic_handler::{{closure}}::h459ea290df0e978a
7: 0x10925eb37 - std::sys_common::backtrace::__rust_end_short_backtrace::h7b815ac00a857fce
8: 0x109255f03 - _rust_begin_unwind
9: 0x1092ac08f - core::panicking::panic_fmt::hedd127944bd71c57
10: 0x1092ac585 - core::result::unwrap_failed::h191e80e385ea5324
11: 0x108deef2d - <smaug::commands::run::Run as smaug::command::Command>::run::h419222623b3fc2a9
12: 0x108e1085c - smaug::main::hd568646c306bfef5
13: 0x108df2596 - std::sys_common::backtrace::__rust_begin_short_backtrace::h4ab5572004134eef
14: 0x108e032ac - std::rt::lang_start::{{closure}}::h0e0abfd90a6d2abf
15: 0x109248ce5 - std::rt::lang_start_internal::h63a1a32878b6f038
16: 0x108e11869 - _main
Workaround:
I needed to add the metadata/ directory and metadata/game_metadata.txt file in order for Smaug to run. Not sure why it didn't tell you that.
I believe the issue should be detected here somewhere:
https://github.com/ereborstudios/smaug/blob/841a8a56d122d4f8de7957cca6b6c5c496be1f52/cli/src/commands/run.rs#L70