{"id":45527,"library":"nest-throttler-storage-redis","title":"NestJS Throttler Storage Redis","description":"A Redis storage adapter for @nestjs/throttler using node-redis. Provides a ThrottlerStorageRedisService class that integrates with NestJS's ThrottlerModule for distributed rate limiting. Version 0.0.1 is pre-stable and unmaintained. Uses the modern node-redis v4 driver. Ships TypeScript types. Requires manual installation of redis peer dependency. Suitable for NestJS applications needing scalable, multi-instance throttling with Redis.","status":"active","version":"0.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/baaxl9vh/nest-throttler-storage-redis","tags":["javascript","nest","nestjs","throttler","storage","redis","typescript"],"install":[{"cmd":"npm install nest-throttler-storage-redis","lang":"bash","label":"npm"},{"cmd":"yarn add nest-throttler-storage-redis","lang":"bash","label":"yarn"},{"cmd":"pnpm add nest-throttler-storage-redis","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for Redis client required at runtime","package":"redis","optional":false},{"reason":"Peer dependency for ThrottlerModule and ThrottlerGuard","package":"@nestjs/throttler","optional":false}],"imports":[{"note":"Package is ESM-only.","wrong":"const ThrottlerStorageRedisService = require('nest-throttler-storage-redis')","symbol":"ThrottlerStorageRedisService","correct":"import { ThrottlerStorageRedisService } from 'nest-throttler-storage-redis'"},{"note":"Only named export is available, no default export.","wrong":"import ThrottlerStorageRedisService from 'nest-throttler-storage-redis'","symbol":"ThrottlerStorageRedisService (named import with destructuring)","correct":"import { ThrottlerStorageRedisService } from 'nest-throttler-storage-redis'"},{"note":"CommonJS require must use destructuring; direct assignment to the require result will be undefined.","wrong":"const ThrottlerStorageRedisService = require('nest-throttler-storage-redis')","symbol":"ThrottlerStorageRedisService in CommonJS","correct":"const { ThrottlerStorageRedisService } = require('nest-throttler-storage-redis')"},{"note":"When using only types, prefer type import to avoid bundling unused code.","wrong":"import { ThrottlerStorageRedisService } from 'nest-throttler-storage-redis'","symbol":"Type import for ThrottlerStorageRedisService","correct":"import type { ThrottlerStorageRedisService } from 'nest-throttler-storage-redis'"}],"quickstart":{"code":"import { Module } from '@nestjs/common';\nimport { ConfigModule, ConfigService } from '@nestjs/config';\nimport { APP_GUARD } from '@nestjs/core';\nimport { ThrottlerGuard, ThrottlerModule } from '@nestjs/throttler';\nimport { ThrottlerStorageRedisService } from 'nest-throttler-storage-redis';\n\n@Module({\n  imports: [\n    ConfigModule.forRoot(),\n    ThrottlerModule.forRootAsync({\n      imports: [ConfigModule],\n      inject: [ConfigService],\n      useFactory: async (config: ConfigService) => ({\n        ttl: 60,\n        limit: 10,\n        storage: new ThrottlerStorageRedisService({\n          socket: {\n            host: config.get<string>('REDIS_HOST', 'localhost'),\n            port: config.get<number>('REDIS_PORT', 6379),\n          },\n          prefix: 'throttler',\n        }),\n      }),\n    }),\n  ],\n  controllers: [],\n  providers: [\n    {\n      provide: APP_GUARD,\n      useClass: ThrottlerGuard,\n    },\n  ],\n})\nexport class AppModule {}","lang":"typescript","description":"Shows how to configure NestJS ThrottlerModule with Redis storage using async module registration and ConfigService."},"warnings":[{"fix":"Consider using @nestjs/throttler-storage-redis or nestjs-throttler-redis-storage for production.","message":"Package is pre-stable (v0.0.1) and has not been maintained; use only for experimental projects.","severity":"gotcha","affected_versions":"<0.1.0"},{"fix":"Run: npm install redis","message":"Requires redis client as peer dependency - not installed automatically.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Refer to documentation for node-redis options; older adapters may use url or legacy options.","message":"Constructor options differ from other throttler storage adapters; uses node-redis v4 style: socket, prefix, etc.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Check @nestjs/throttler version; update package or switch to official storage packages.","message":"@nestjs/throttler v5 introduced IStorage interface changes; this package may not be compatible with latest versions.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Use const { ThrottlerStorageRedisService } = require('nest-throttler-storage-redis')","message":"CommonJS require must use destructuring; direct require returns undefined.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.0.1':30 'adapt':8 'applic':58 'class':18 'depend':54 'distribut':26 'driver':44 'instal':50 'instanc':63 'integr':20 'javascript':67 'limit':28 'manual':49 'modern':39 'multi':62 'multi-inst':61 'need':59 'nest':68 'nestj':1,22,57,69 'nestjs/throttler':10 'node':13,41 'node-redi':12,40 'peer':53 'pre':33 'pre-stabl':32 'provid':15 'rate':27 'redi':4,6,14,42,52,66,72 'requir':48 'scalabl':60 'ship':45 'stabl':34 'storag':3,7,71 'suitabl':55 'throttl':64 'throttler':2,70 'throttlermodul':24 'throttlerstorageredisservic':17 'type':47 'typescript':46,73 'unmaintain':36 'use':11,37 'v4':43 'version':29","created_at":"2026-06-07T12:55:27.225267+00:00","updated_at":"2026-06-07T12:55:27.225267+00:00","problems":[{"fix":"npm install nest-throttler-storage-redis","cause":"Package not installed","error":"Error: Cannot find module 'nest-throttler-storage-redis'"},{"fix":"Use const { ThrottlerStorageRedisService } = require('nest-throttler-storage-redis')","cause":"CommonJS require without destructuring (wrong import)","error":"TypeError: ThrottlerStorageRedisService is not a constructor"},{"fix":"Ensure redis package is installed and passed valid options (socket.host, socket.port)","cause":"Missing redis client or incorrect Redis connection options","error":"Error: The \"path\" argument must be of type string. Received undefined"},{"fix":"Verify import: import { ThrottlerStorageRedisService } from 'nest-throttler-storage-redis'","cause":"Import path incorrect or package not exporting correctly","error":"Nest cannot find ThrottlerStorageRedisService (appears in providers but not exported)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/baaxl9vh/nest-throttler-storage-redis#readme","github":"https://github.com/baaxl9vh/nest-throttler-storage-redis","docs":null,"changelog":null,"pypi":null,"npm":"nest-throttler-storage-redis","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}