T
TanStack•5mo ago
unwilling-turquoise

i cannot find createServerFileRoute

Hi sorry if my question was a newbie but, does anyone know how to import this module come from? when i want to autocomplete it, my code editor doesn't recognise it Thanks 🙂
No description
7 Replies
xenophobic-harlequin
xenophobic-harlequin•5mo ago
if you run the dev server and write export const ServerRoute = null it will auto complete it for you, with the import too. but anyway import { createServerFileRoute } from '@tanstack/react-start/server'
unwilling-turquoise
unwilling-turquoiseOP•5mo ago
it doesn't autocomplete thanks for the information btw
unwilling-turquoise
unwilling-turquoiseOP•5mo ago
eh i do have more question, this was autocompleted when i imported, but i got an error says Argument of type '"/admin/_protected/generus/"' is not assignable to parameter of type 'never'. that was my route but it didn't regconise it
No description
xenophobic-harlequin
xenophobic-harlequin•5mo ago
is your dev server running ?
unwilling-turquoise
unwilling-turquoiseOP•5mo ago
yeah it is you need something i can provide it
xenophobic-harlequin
xenophobic-harlequin•5mo ago
dumb question but have you tried reloading the LSP ? (just reload vscode) if yes try to delete the generated route file, and restart the dev server if STILL no good, retry writing only this export const ServerRoute = createServerFileRoute() without any import, and save the file, while the dev server is running if it still doesnt work, im not sure how i can help more @Slaughtered
unwilling-turquoise
unwilling-turquoiseOP•5mo ago
oh yeah it work now, thanks bro really help a lot

Did you find this page helpful?