canLoad redirect with @aurelia/router

I am using @aurelia/router instead of router-lite and would like to redirect a user to the “home page” if a certain condition is met.

main.js

import { RouterConfiguration } from '@aurelia/router'

Aurelia
  .register(RouterConfiguration.customize({
    useDirectRouting: false,
    useUrlFragmentHash: true,
    useHref: false
  }))

Im my-app.js I specify the routes.

import { IRouter, routes } from '@aurelia/router'

@routes( [
  { path: '', redirectTo: 'step-01' },

  { id: 'step-01', path: 'step-01', component: import('...')},
  { id: 'step-02', path: 'step-02', component: import('...') }
])

In step-02.js I am using the canLoad hook.

canLoad() {
    if (something) {
      return 'step-01'
    } else {
      return true
    }
  }

This gives an error:

Uncaught (in promise) Error: 'step-01' did not match any configured route or registered component name - did you forget to add the component ‘step-01’ to the dependencies or to register it as a global dependency?

What am I doing wrong?

Is step-01 a root path? What happens if you specify /step-01?

Should be. Still get the same error:

Error: '/step-01' did not match any configured route or registered component name

Error: '#/step-01' did not match any configured route or registered component name