Registry / database / redis-sharelatex

redis-sharelatex

JSON →
library1.0.13jsnpmunverified

Redis wrapper for Node.js that transparently handles cluster, sentinel, or single-instance Redis connections. The package is in maintenance mode (v1.0.13) with no recent updates. It auto-detects Redis configuration and provides a unified interface, but lacks official TypeScript types and has limited documentation. Alternatives like ioredis offer broader support and active maintenance.

npm install redis-sharelatex
INSTALL
IMPORT
SIG · REDIS-SHARELATEX
R
redis-sharelatex
databasejavascriptv1.0.13
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import redis from 'redis-sharelatex'
const redis = require('redis-sharelatex')
Package does not ship ESM. Use CommonJS require or dynamic import.
createClient
import { createClient } from 'redis-sharelatex'
const createClient = require('redis-sharelatex').createClient
Named export exists but not typed. Use CommonJS require as fallback.
RedisConfig
import type { RedisConfig } from 'redis-sharelatex'
import { RedisConfig } from 'redis-sharelatex' (no runtime export)
Type-only export if available; install @types/redis-sharelatex if needed.

Initializes a Redis client with auto-detection (cluster/sentinel/single) and performs basic set/get operations.

const redis = require('redis-sharelatex'); async function main() { const client = redis.createClient({ // Auto-detects cluster/sentinel/single host: process.env.REDIS_HOST ?? 'localhost', port: parseInt(process.env.REDIS_PORT ?? '6379'), password: process.env.REDIS_PASSWORD ?? undefined, }); await client.connect(); console.log('Connected to Redis'); await client.set('key', 'value'); const val = await client.get('key'); console.log('Got:', val); await client.quit(); } main().catch(console.error);
Debug
Known issues
breakingBreaking change: dropped support for Node.js < 10 in v1.0.0
fix
Upgrade Node.js to version 10 or later.
affects: >=1.0.0
deprecatedPackage is in maintenance mode; no new features or major updates planned.
fix
Consider migrating to ioredis for active development and TypeScript support.
affects: all
gotchaNo TypeScript declarations; using with TypeScript requires custom type definitions.
fix
Create a .d.ts file or use @types/redis-sharelatex if available.
affects: all
gotchaEnvironment variable parsing: numeric ports may be incorrectly parsed if passed as string.
fix
Ensure port is a number: parseInt(process.env.REDIS_PORT ?? '6379').
affects: <1.0.13
gotchaUnderlying redis client version may conflict with other dependencies.
fix
Check version compatibility; pin redis dependency if needed.
affects: all
Errors
Common errors & fixes
TypeError: redis.createClient is not a function
Incorrect import or package not installed properly.
fix
Ensure package is installed: npm install redis-sharelatex. Use CommonJS require if using ESM.
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Redis server not running or incorrect host/port.
fix
Start Redis server or verify connection settings.
Error: ERR wrong number of arguments for 'auth' command
Authentication password contains special characters not properly escaped.
fix
Ensure password is properly URL-encoded or passed as string.
Error: Redis sentinel requires sentinels option
Using sentinel mode but not providing sentinel hosts.
fix
Set REDIS_SENTINELS environment variable or pass sentinels array in options.
Upgrade
Version history
1.0.13latest on npm
Audit
Dependencies
redisrequiredUsed as the underlying Redis client library; version-specific behavior may affect redis-sharelatex.
Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources
redis-sharelatex — npm install redis-sharelatex · libregistry