DioxusLabs/dioxus · error · syn::Error
Routes should start with /. Error found in the route '{}'
Error message
Routes should start with /. Error found in the route '{}' What it means
Error "Routes should start with /. Error found in the route '{}'" thrown in DioxusLabs/dioxus.
Source
Thrown at packages/router-macro/src/segment.rs:169
};
let (route_string, query) = match route_string.rsplit_once('?') {
Some((route, query)) => (
route,
Some(QuerySegment::parse_from_str(
route_span,
fields.clone(),
query,
)?),
),
None => (route_string, None),
};
let mut iterator = route_string.split('/');
// skip the first empty segment
let first = iterator.next();
if first != Some("") {
return Err(syn::Error::new(
route_span,
format!(
"Routes should start with /. Error found in the route '{}'",
route
),
));
}
while let Some(segment) = iterator.next() {
if let Some(segment) = segment.strip_prefix(':') {
let spread = segment.starts_with("..");
let ident = if spread {
segment[2..].to_string()
} else {
segment.to_string()
};
View on GitHub (pinned to 393d190a80)
When it happens
Trigger: Thrown at packages/router-macro/src/segment.rs:169 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@393d190a80 (2026-08-16).
Data as JSON: /api/errors/44adde71b4a202a7.
Report an issue: GitHub.