Installation
pnpm
pnpm add @trpc/server @trpc/client trpc-nuxt zod
nuxt.config.ts
export default defineNuxtConfig({
build: {
transpile: ['trpc-nuxt']
}
})
Why @trpc/server?
For implementing tRPC endpoints and routers.
Why @trpc/client?
For making typesafe API calls from your client.
Why zod?
Most examples use Zod for input validation and tRPC.io highly recommends it, though it isn't required.
Next Steps
Now that you've installed the required dependencies, you are ready to start building your application.