{"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,"search_vec":"'-1.0':57 '0.0.2':23 'across':14 'applic':42 'approach':39 'automat':8 'cadenc':28 'correl':12,77 'correlationid':2,84 'correlationid-middlewar':1 'current':19 'depend':38 'develop':74 'differenti':30 'document':59 'earli':54 'early-stag':53 'esm':64 'express':44 'extern':81 'framework':47 'generat':9 'howev':48 'http':15 'id':13,78 'javascript':83 'lightweight':76 'may':61 'middlewar':3,5 'minim':35 'nativ':67 'need':75 'nich':71 'node.js':41 'offer':33 'packag':6,50 'poor':58 'pre':56 'propag':11 'releas':27 'request':16 'respons':18 'servic':82 'similar':46 'stabl':20 'stage':55 'support':63 'tool':72 'track':79 'typescript':66 'unclear':26 'use':43 'version':21 'without':80 'zero':37 'zero-depend':36","created_at":"2026-05-01T17:43:14.875325+00:00","updated_at":"2026-05-01T17:43:14.875325+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/correlationid-middleware","openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking","observability","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-04-25","next_check":"2026-07-24","install_tag":null}}