{"id":21696,"library":"pixl-server-storage","title":"pixl-server-storage","description":"A key/value/list storage component for the pixl-server framework, providing multiple back-end engines including local filesystem, Amazon S3, Redis, SQLite, and hybrid. Version 4.1.0 is current, with regular updates. It introduces chunked linked lists for fast list operations, hash tables with key iteration, transaction system for atomic commits/rollbacks, advisory locking, and full-text search indexing. Designed for simplicity and low memory usage, it stands out by supporting multiple storage back-ends with consistent API and built-in maintenance features like auto-expiration and compaction.","status":"active","version":"4.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/jhuckaby/pixl-server-storage","tags":["javascript","storage","nosql","s3","couchbase","redis","sqlite"],"install":[{"cmd":"npm install pixl-server-storage","lang":"bash","label":"npm"},{"cmd":"yarn add pixl-server-storage","lang":"bash","label":"yarn"},{"cmd":"pnpm add pixl-server-storage","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required as core framework for integration within pixl-server standalone mode.","package":"pixl-server","optional":false},{"reason":"Used for performance metrics and logging.","package":"pixl-perf","optional":false},{"reason":"Required for Amazon S3 engine support.","package":"aws-sdk","optional":true},{"reason":"Required for Redis and RedisCluster engine support.","package":"redis","optional":true},{"reason":"Required for SQLite engine support.","package":"sql.js","optional":true}],"imports":[{"note":"ESM module; CommonJS require is not supported.","wrong":"const StorageComponent = require('pixl-server-storage')","symbol":"StorageComponent","correct":"import { StorageComponent } from 'pixl-server-storage'"},{"note":"Default export is the StorageComponent class.","wrong":"import * as pixlServerStorage from 'pixl-server-storage'","symbol":"pixl-server-storage","correct":"import pixlServerStorage from 'pixl-server-storage'"},{"note":"For TypeScript, use named import for type.","wrong":"","symbol":"StorageComponent type","correct":"import { StorageComponent } from 'pixl-server-storage'"}],"quickstart":{"code":"import { StorageComponent } from 'pixl-server-storage';\n\nconst storage = new StorageComponent({\n  engine: 'filesystem',\n  engine_path: '/tmp/storage',\n  debug: true\n}, (err) => {\n  if (err) throw err;\n  console.log('Storage initialized');\n});\n\n// Store a record\nstorage.put('user:123', { name: 'Alice', email: 'alice@example.com' }, (err) => {\n  if (err) throw err;\n  console.log('Record stored');\n});\n\n// Fetch a record\nstorage.get('user:123', (err, data) => {\n  if (err) throw err;\n  console.log('Fetched:', data);\n});","lang":"typescript","description":"Initializes the storage component with filesystem engine, stores and fetches a JSON record asynchronously."},"warnings":[{"fix":"Upgrade Node.js to 12+ or stay on pixl-server-storage@3.x.","message":"Version 4.x drops support for Node.js < 12. Ensure you are on Node.js 12 or later.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Manually normalize keys before passing to API.","message":"The 'lower_case_keys' configuration option is deprecated and will be removed in version 5.0.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Always provide an absolute path for 'engine_path' when using filesystem engine.","message":"Default engine is 'filesystem', which requires an absolute path for 'engine_path'. Relative paths may cause data loss.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Update 'redis' dependency to ^4.0.0 and adjust connection options accordingly.","message":"Redis engine used to support 'redis' package v2, but version 4.x requires 'redis' v4 or above.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Install 'aws-sdk' v2 (e.g., 'npm install aws-sdk@2') and configure region/credentials.","message":"When using Amazon S3 engine, the 'aws-sdk' v3 is not supported; only v2 is compatible.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure 'engine_path' directory exists and is writable. Use an absolute path.","cause":"The filesystem engine cannot find or create the specified path. Path must be writable and exist (or engine_path directory must exist).","error":"Error: ENOENT: no such file or directory, open '/path/to/file'"},{"fix":"Use ESM import syntax: import { StorageComponent } from 'pixl-server-storage'.","cause":"Used CommonJS require or incorrect import. The module is ESM-only.","error":"TypeError: storage.put is not a function"},{"fix":"Set 'engine' to one of the valid options or implement a custom engine plugin.","cause":"Unsupported engine type provided in configuration. Engines: 'filesystem', 's3', 'redis', 'sqlite', 'hybrid'.","error":"Error: Invalid engine type: 'mysql'"},{"fix":"Start Redis server or configure 'engine_opts' with correct host/port.","cause":"Redis server is not running or not accessible at the configured host/port.","error":"Error: Redis connection error: connect ECONNREFUSED 127.0.0.1:6379"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}