TanStackT
TanStack2y ago
5 replies
worthy-azure

Typing issue with IntelliJ IDEA

Hi,

I noticed the following error on a TR skeleton project (first time TR user following the docs!).

import { createFileRoute } from '@tanstack/react-router'

const Accounts = () => {
  return <div>Hello /accounts</div>
}

export const Route = createFileRoute('/accounts')({
  component: Accounts
})


There's no autocomplete on the possible routes (as the parameter of createFileRoute) and there's the following error:

Argument type "/accounts" is not assignable to parameter type keyof FileRoutesByPath


In VSCode however, no problem!

Any ideas ?

Thanks
Was this page helpful?