Skip to main content

Installation

Requirements​

  • Node.js >=22 (>=22.12 to run NestJS 12 — see Support Policy)
  • NestJS ^11.0.0 || ^12.0.0
  • tRPC 11.x

For the supported API tiers and compatibility boundary, see Support Policy.

Install the Package​

npm i @nest-native/trpc @trpc/server

Peer Dependencies​

These are required by any NestJS app and should already be installed:

npm i @nestjs/common @nestjs/core reflect-metadata rxjs

Optional: Zod v4​

If you want tRPC-style schema validation (@Query({ input: z.object(...) })) and auto schema generation:

npm i zod@^4

:::tip Zod is optional If you prefer Nest-style validation (class-validator + ValidationPipe), you can use @nest-native/trpc without Zod. See class-validator validation for details. :::

Zero Runtime Dependencies​

@nest-native/trpc has an empty "dependencies": {} block by design:

  • It never pulls a second NestJS runtime into your app
  • Your app controls Nest and tRPC versions through peer dependencies
  • All capabilities come from packages you already have: reflect-metadata, @nestjs/common, @nestjs/core, @trpc/server, and Node built-ins