Aviary
Guides

Installation

Install nestjs-inertia packages with pnpm, npm, or yarn, and understand peer dependencies.

Install core + Vite

pnpm add @dudousxd/nestjs-inertia @dudousxd/nestjs-inertia-vite
pnpm add -D @dudousxd/nestjs-codegen @dudousxd/nestjs-inertia-codegen-extension
npm install @dudousxd/nestjs-inertia @dudousxd/nestjs-inertia-vite
npm install --save-dev @dudousxd/nestjs-codegen @dudousxd/nestjs-inertia-codegen-extension
yarn add @dudousxd/nestjs-inertia @dudousxd/nestjs-inertia-vite
yarn add -D @dudousxd/nestjs-codegen @dudousxd/nestjs-inertia-codegen-extension

HTTP adapter

NestJS defaults to Express. If you use Fastify, install the Fastify adapter instead.

Express (default)

pnpm add express
pnpm add -D @types/express
npm install express
npm install --save-dev @types/express
yarn add express
yarn add -D @types/express

Fastify

pnpm add fastify @fastify/cookie @nestjs/platform-fastify
npm install fastify @fastify/cookie @nestjs/platform-fastify
yarn add fastify @fastify/cookie @nestjs/platform-fastify

Peer dependencies

Peer depRequired byCondition
@nestjs/common >=10corealways
@nestjs/core >=10corealways
express >=4coreExpress adapter (default)
fastify >=4coreFastify adapter
vite >=5vitebuild pipeline
@nestjs/testing >=10testingtest suites
typescript >=5@dudousxd/nestjs-codegenCLI static analysis
@dudousxd/nestjs-codegen >=0.1codegen extensiontyped-client codegen host
@inertiajs/react >=1codegen extensionprovides the router for navigate()

Optional packages

Install only what you need.

# Typed HTTP client + <Link> components
pnpm add @dudousxd/nestjs-inertia-client

# Test helpers (expectInertia, InertiaTestingModule)
pnpm add -D @dudousxd/nestjs-inertia-testing
npm install @dudousxd/nestjs-inertia-client
npm install --save-dev @dudousxd/nestjs-inertia-testing
yarn add @dudousxd/nestjs-inertia-client
yarn add -D @dudousxd/nestjs-inertia-testing

Engine requirements

All packages require Node.js >= 20. NestJS 10 and 11 are both supported.

On this page