{"id":46573,"library":"systemic-redis","title":"Systemic Redis","description":"A systemic redis component that integrates Redis into the systemic dependency injection framework. Current stable version is 3.0.2, released under a correction of serious versioning issues in the 2.x line (2.1.0–2.2.0 contain undocumented breaking changes and are discouraged). The package wraps the ioredis client and provides lifecycle management (connect, disconnect) within systemic's component model. Compared to raw ioredis usage, it offers declarative configuration and automatic connection handling, but requires understanding of systemic's patterns. Version 3.0.0 introduced breaking changes from 2.0.1, and the package only supports Node >=10. Release cadence is sporadic, with long gaps between versions.","status":"active","version":"3.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/guidesmiths/systemic-redis","tags":["javascript","systemic","redis"],"install":[{"cmd":"npm install systemic-redis","lang":"bash","label":"npm"},{"cmd":"yarn add systemic-redis","lang":"bash","label":"yarn"},{"cmd":"pnpm add systemic-redis","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency: the component is designed to be used within a systemic application","package":"systemic","optional":false},{"reason":"Peer dependency: uses ioredis under the hood for Redis connectivity","package":"ioredis","optional":false}],"imports":[{"note":"The package is CommonJS-only; ESM import will fail.","wrong":"import redis from 'systemic-redis'","symbol":"default","correct":"const redis = require('systemic-redis')"},{"wrong":"// No wrong pattern for named export, but note that this is equivalent to default.","symbol":"redis (named export)","correct":"const { redis } = require('systemic-redis')"},{"note":"systemic is also CommonJS-only; avoid ESM imports.","wrong":"import { System } from 'systemic'","symbol":"System (from systemic)","correct":"const System = require('systemic')"}],"quickstart":{"code":"const System = require('systemic');\nconst redis = require('systemic-redis');\n\nnew System()\n  .configure({\n    redis: {\n      url: process.env.REDIS_URL ?? 'redis://127.0.0.1/1'\n    }\n  })\n  .add('logger', console)\n  .add('redis', redis()).dependsOn('config', 'logger')\n  .start((err, components) => {\n    if (err) {\n      console.error('Failed to start', err);\n      process.exit(1);\n    }\n    components.redis.client.set('key', 'value', (err, result) => {\n      if (err) console.error(err);\n      else console.log('Set succeeded:', result);\n      components.redis.client.get('key', (err, value) => {\n        console.log('Got:', value);\n        process.exit(0);\n      });\n    });\n  });","lang":"javascript","description":"Demonstrates basic usage: configure Redis URL, add to systemic, start and interact with Redis client."},"warnings":[{"fix":"Upgrade directly from 2.0.1 to 3.0.0 or later.","message":"Upgrading from 2.0.1 to 2.1.0, 2.1.1, or 2.2.0 is discouraged due to incorrect versioning and breaking changes.","severity":"breaking","affected_versions":">=2.1.0 <3.0.0"},{"fix":"Refer to the migration guide in the repo's release notes.","message":"Version 3.0.0 includes breaking changes from 2.0.1; check the changelog for details.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Install @types/ioredis and declare module augmentation for systemic-redis.","message":"The package does not provide TypeScript definitions; users must create their own or use @types/ioredis for the client.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade Node.js version.","message":"Node.js 10 is in end-of-life; consider upgrading to Node 14+.","severity":"deprecated","affected_versions":"<=10"}],"env_vars":null,"search_vec":"'10':93 '2':31 '2.0.1':86 '2.1.0':34 '2.2.0':35 '3.0.0':81 '3.0.2':20 'automat':70 'break':38,83 'cadenc':95 'chang':39,84 'client':48 'compar':60 'compon':6,58 'configur':68 'connect':53,71 'contain':36 'correct':24 'current':16 'declar':67 'depend':13 'disconnect':54 'discourag':42 'framework':15 'gap':100 'handl':72 'inject':14 'integr':8 'introduc':82 'ioredi':47,63 'issu':28 'javascript':103 'lifecycl':51 'line':33 'long':99 'manag':52 'model':59 'node':92 'offer':66 'packag':44,89 'pattern':79 'provid':50 'raw':62 'redi':2,5,9,105 'releas':21,94 'requir':74 'serious':26 'sporad':97 'stabl':17 'support':91 'system':1,4,12,56,77,104 'understand':75 'undocu':37 'usag':64 'version':18,27,80,102 'within':55 'wrap':45 'x':32","created_at":"2026-06-07T13:00:35.661060+00:00","updated_at":"2026-06-07T13:00:35.661060+00:00","problems":[{"fix":"Ensure 'systemic-redis' is listed in package.json and npm install was run.","cause":"Missing dependency or incorrect import path.","error":"Error: Cannot find module 'systemic-redis'"},{"fix":"Use redis() as a factory: const redisComponent = require('systemic-redis')();","cause":"Using the result of require('systemic-redis') directly as a function without calling it.","error":"TypeError: redis is not a function"},{"fix":"Ensure .configure() sets redis.url or provide a config component with the 'redis' key.","cause":"The config component is missing or not properly provided.","error":"Error: CONFIG is not defined"},{"fix":"Start Redis server or check REDIS_URL environment variable.","cause":"Redis server is not running or unreachable.","error":"Error: Redis connection to 127.0.0.1:6379 failed"}],"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/guidesmiths/systemic-redis#readme","github":"https://github.com/guidesmiths/systemic-redis","docs":null,"changelog":null,"pypi":null,"npm":"systemic-redis","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","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}}