FuelLabs/sway · error · anyhow::Error
found invalid root file path for {} make sure your project's
Error message
found invalid root file path for {}
make sure your project's name contains only valid unicode characters What it means
Error "found invalid root file path for {} make sure your project's name contains only valid unicode characters" thrown in FuelLabs/sway.
Source
Thrown at forc-plugins/forc-doc/src/render/sidebar.rs:75
DocStyle::WorkspaceIndex => {
format!("Workspace {}", self.module_info.location())
}
DocStyle::ModuleIndex => format!(
"{} {}",
BlockTitle::Modules.item_title_str(),
self.module_info.location()
),
DocStyle::Item { title, name } => {
let title = title.clone().expect("Expected a BlockTitle");
let name = name.clone().expect("Expected a BaseIdent");
format!("{} {}", title.item_title_str(), name.as_str())
}
};
let root_path = self.module_info.to_html_shorthand_path_string(
PathBuf::from(self.module_info.project_name())
.join(INDEX_FILENAME)
.to_str()
.ok_or_else(|| anyhow::anyhow!(
"found invalid root file path for {}\nmake sure your project's name contains only valid unicode characters",
self.module_info.project_name(),
))?,
);
let logo_path_to_root = match style {
DocStyle::AllDoc(_) | DocStyle::Item { .. } | DocStyle::ModuleIndex => root_path,
DocStyle::ProjectIndex(_) | DocStyle::WorkspaceIndex => IDENTITY.to_owned(),
};
// Unfortunately, match arms that return a closure, even if they are the same
// type, are incompatible. The work around is to return a String instead,
// and render it from Raw in the final output.
let styled_content = match &self.style {
DocStyle::WorkspaceIndex => {
let nav_links = &self.nav.links;
box_html! {
div(class="sidebar-elems") {
section {
div(class="block") {View on GitHub (pinned to 47e5e902fa)
When it happens
Trigger: Thrown at forc-plugins/forc-doc/src/render/sidebar.rs:75 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of FuelLabs/sway@47e5e902fa (2026-08-16).
Data as JSON: /api/errors/78820dca7ab36b0c.
Report an issue: GitHub.