Import issue in routeTree.gen.ts when creating api routes
I have created an API route in
src/routes/api/auth/$.ts :
However, when the routeTree.gen.ts file gets regenerated it tries to import and use a named export called Route from the api route file which does not exist as the named export is called APIRoute.
This causes an error as the import is incorrect. Am I missing some configuration or is this a known bug?4 Replies
deep-jade•6mo ago
are you on the latest version of all packages ?
foreign-sapphireOP•6mo ago
Additional context, I have configured the
appDirectory to be src in app.config.ts and I have configured the api router in api.ts like so:
yes I updated all the packages to latest version
deep-jade•6mo ago
do you have a vite.config.ts by chance ?
if yes delete that
only use app.config.ts (for now as long as we still have vinxi)
foreign-sapphireOP•6mo ago