Error #1: Route path compilation failed
In production builds the console shows minified error #1 with a link to this page; in other environments you get a multi-line message with the same meaning.
Explanation
This happens inside Route.createUrl() when the route path pattern (via path-to-regexp compile) throws while building the path from the current params. Typical causes include missing or invalid path params for the template, or a malformed pattern.
The library catches the error and falls back to fallbackPath from the route or routeConfig fallbackPath, or to '/' if none is set.
Potential solutions
- Ensure
createUrl/openreceives params that satisfy every dynamic segment in the route path. - Set a safe
fallbackPathon the route or globally viarouteConfigwhen params can be incomplete at runtime. - Inspect the exception logged as the second argument to
console.errorin non-production builds.
