Installation
Requirements
- Node.js >= 18.0.0
- NestJS >= 9.0.0 (supports 9, 10, 11)
- TypeScript >= 4.7
Install via npm
- npm
- Yarn
- pnpm
- Bun
npm install nestlens
yarn add nestlens
pnpm add nestlens
bun add nestlens
Peer Dependencies
NestLens requires these peer dependencies (likely already in your NestJS project):
@nestjs/common^9.0.0 || ^10.0.0 || ^11.0.0@nestjs/core^9.0.0 || ^10.0.0 || ^11.0.0reflect-metadata^0.1.13 || ^0.2.0rxjs^7.0.0
Bundled Dependencies
These ship with NestLens — you don't need to install them:
class-transformer- DTO transformationclass-validator- Input validationuuid- Request ID generation
Optional Dependencies
Install these only when you use the matching feature. They are declared as optional peer dependencies, so npm will not complain if they are missing:
| Package | Needed for |
|---|---|
better-sqlite3 ^11.0.0 | SQLite storage driver |
ioredis ^5.0.0 | Redis storage driver and Redis watcher |
@nestjs/graphql + @nestjs/apollo + @apollo/server | GraphQL watcher (Apollo) |
@nestjs/graphql + @nestjs/mercurius + mercurius | GraphQL watcher (Mercurius/Fastify) |
@nestjs/schedule | Schedule watcher (cron/interval/timeout tracking) |
better-sqlite3is also listed as anoptionalDependency, so npm tries to install it automatically; if the native build fails, NestLens still works on the default in-memory storage.
HTTP Adapter Compatibility
NestLens works with both NestJS HTTP adapters out of the box — no extra configuration is required:
@nestjs/platform-express(default)@nestjs/platform-fastify
The dashboard lives at /nestlens on both adapters.
Fastify note: Fastify does not treat trailing slashes as equivalent by default. The dashboard is served at
/nestlens(no trailing slash). If you want/nestlens/to resolve as well, enableignoreTrailingSlash: truein yourFastifyAdapteroptions.
Verify Installation
After installation, verify it's working:
npm ls nestlens