if I export 'appRouter' instead of 'router' I get error
hey everyone, I have this exact setup https://icflorescu.github.io/trpc-sveltekit/getting-started
I created all the files inside of
/src/trpc/
besides the hooks.server.ts
which is inside /src/trpc/
only difference is that inside the file router.ts
I've changed the variable name router
in this line: to and then at the bottom changed to
and changed the file /src/trpc/router.ts
to /src/trpc/appRouter.ts
and inside of /src/trpc/client.ts
changed to
inside of /src/hooks.server.ts
I've changed the import to and changed this line
to 2 Replies
But what's the error?
sorry for the late response just seeing this, I managed to fix it, in my hooks.server.ts(I'm using Svelte/SvelteKit) I had
instead of
My typescript wasn't working properly so that wasn't even throwing a warning, but since fixing my typescript I noticed it