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 🙂

7 Replies
ambitious-aqua•2mo 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'
ratty-blushOP•2mo ago
it doesn't autocomplete
thanks for the information btw
ratty-blushOP•2mo 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
ambitious-aqua•2mo ago
is your dev server running ?
ratty-blushOP•2mo ago
yeah it is
you need something i can provide it
ambitious-aqua•2mo 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 @Slaughteredratty-blushOP•2mo ago
oh yeah it work now, thanks bro really help a lot