{"id":46085,"library":"redis-client","title":"redis-client","description":"A lightweight Redis client for Node.js, version 0.3.5. Provides basic Redis commands like get, set, del, incr, and support for key expiry. Released in early Node.js days (circa 2011) and no longer actively maintained. Not for production use. Modern alternatives: ioredis or redis (node_redis).","status":"deprecated","version":"0.3.5","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","redis","node","client"],"install":[{"cmd":"npm install redis-client","lang":"bash","label":"npm"},{"cmd":"yarn add redis-client","lang":"bash","label":"yarn"},{"cmd":"pnpm add redis-client","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package has a default export. Use ESM import for clarity.","wrong":"const redis = require('redis-client')","symbol":"default","correct":"import RedisClient from 'redis-client'"},{"note":"Named export does not exist; only default export.","wrong":"import { RedisClient } from 'redis-client'","symbol":"RedisClient","correct":"import RedisClient from 'redis-client'"},{"note":"No createClient function; instantiate with new.","wrong":"const client = RedisClient.createClient();","symbol":"createClient","correct":"import RedisClient from 'redis-client';\nconst client = new RedisClient();"}],"quickstart":{"code":"import RedisClient from 'redis-client';\n\nconst client = new RedisClient();\n\nclient.on('connect', () => {\n  console.log('Connected to Redis');\n});\n\nclient.set('key', 'value', (err, reply) => {\n  if (err) throw err;\n  console.log(reply); // OK\n});\n\nclient.get('key', (err, reply) => {\n  if (err) throw err;\n  console.log(reply); // 'value'\n});","lang":"javascript","description":"Connects to Redis, sets a key, and retrieves it. Uses callback pattern. Note: Redis server must be running on localhost:6379."},"warnings":[{"fix":"Migrate to ioredis or node_redis (redis npm package).","message":"Package is deprecated; no longer maintained.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Use modern Redis clients with async/await support.","message":"Callbacks are used; no promise support.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Instantiate with new RedisClient() instead of calling as function.","message":"Default export is a class; must use new keyword.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.3.5':11 '2011':32 'activ':36 'altern':43 'basic':13 'circa':31 'client':3,7,52 'command':15 'day':30 'del':19 'earli':28 'expiri':25 'get':17 'incr':20 'ioredi':44 'javascript':49 'key':24 'lightweight':5 'like':16 'longer':35 'maintain':37 'modern':42 'node':47,51 'node.js':9,29 'product':40 'provid':12 'redi':2,6,14,46,48,50 'redis-cli':1 'releas':26 'set':18 'support':22 'use':41 'version':10","created_at":"2026-06-07T12:58:13.601952+00:00","updated_at":"2026-06-07T12:58:13.601952+00:00","problems":[{"fix":"Use import RedisClient from 'redis-client' or const RedisClient = require('redis-client').default if using CommonJS.","cause":"Using named import instead of default import or using require incorrectly.","error":"TypeError: RedisClient is not a constructor"},{"fix":"Ensure Redis is started: redis-server. Or pass custom options: new RedisClient({host: '...', port: ...}).","cause":"Redis server not running or wrong host/port.","error":"Error: Redis connection refused"}],"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":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"redis-client","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"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}}