{"id":26855,"library":"correlationid-middleware","title":"correlationid-middleware","description":"A middleware package for automatically generating and propagating correlation IDs across HTTP requests and responses. Current stable version is 0.0.2, with an unclear release cadence. It differentiates itself by offering a minimal, zero-dependency approach for Node.js applications using Express or similar frameworks. However, the package is very early-stage (pre-1.0), poorly documented, and may not support ESM or TypeScript natively. It is a niche tool for developers needing lightweight correlation ID tracking without external services.","status":"active","version":"0.0.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","correlationid"],"install":[{"cmd":"npm install correlationid-middleware","lang":"bash","label":"npm"},{"cmd":"yarn add correlationid-middleware","lang":"bash","label":"yarn"},{"cmd":"pnpm add correlationid-middleware","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package appears to be CommonJS; require() works but ESM import may fail. Verify package exports.","wrong":"const correlationId = require('correlationid-middleware')","symbol":"default","correct":"import correlationId from 'correlationid-middleware'"},{"note":"Named export may not exist; default export likely a function. Check package entry.","wrong":"import { CorrelationIdMiddleware } from 'correlationid-middleware'","symbol":"CorrelationIdMiddleware","correct":"const { CorrelationIdMiddleware } = require('correlationid-middleware')"},{"note":"TypeScript types not provided in this version; likely no type definitions.","wrong":"","symbol":"Types","correct":"import type { CorrelationIdOptions } from 'correlationid-middleware'"}],"quickstart":{"code":"const express = require('express');\nconst correlationId = require('correlationid-middleware');\n\nconst app = express();\napp.use(correlationId());\n\napp.get('/', (req, res) => {\n  console.log(req.correlationId);\n  res.json({ correlationId: req.correlationId });\n});\n\napp.listen(3000, () => console.log('Server running on port 3000'));","lang":"javascript","description":"Shows basic Express integration to auto-generate correlation IDs per request."},"warnings":[{"fix":"Inspect source code to understand exports and config options.","message":"No README or documentation; API usage is ambiguous.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider mature alternatives like 'correlation-id' or 'express-correlation-id'.","message":"Version 0.0.2 is extremely early; no stability guarantees.","severity":"deprecated","affected_versions":"<1.0.0"},{"fix":"Stick to known working version and pin dependency.","message":"Default export behavior may change without prior notice.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install correlationid-middleware' and ensure package.json lists it.","cause":"Package not installed or not in node_modules.","error":"Cannot find module 'correlationid-middleware'"},{"fix":"Check actual exports: use require('correlationid-middleware') and log the module.","cause":"Import returns object instead of function.","error":"correlationId is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}