{"id":40785,"library":"cucumber-html","title":"cucumber-html","description":"Cross-platform HTML formatter for all Cucumber implementations (JVM, JS, etc.). Current stable version is 0.2.4, with low release cadence (last release in 2016). Generates HTML5-compliant reports, replaces old PDF formatter. Supports wkhtmltopdf for PDF conversion. Minimalistic with no dependencies.","status":"maintenance","version":"0.2.4","language":"javascript","source_language":"en","source_url":"git://github.com/cucumber/cucumber-html","tags":["javascript"],"install":[{"cmd":"npm install cucumber-html","lang":"bash","label":"npm"},{"cmd":"yarn add cucumber-html","lang":"bash","label":"yarn"},{"cmd":"pnpm add cucumber-html","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export; no named exports.","wrong":"const formatter = require('cucumber-html')","symbol":"formatter","correct":"import formatter from 'cucumber-html'"},{"note":"CommonJS require works, but package is designed for Node.js; no ESM wrapper.","wrong":"","symbol":"default","correct":"const formatter = require('cucumber-html')"},{"note":"No named exports; use default import and call with JSON data.","wrong":"import { format } from 'cucumber-html'","symbol":"None (script usage)","correct":"// CLI usage only: cucumber-html can be used programmatically via JSON stream"}],"quickstart":{"code":"import formatter from 'cucumber-html';\nimport { createWriteStream } from 'fs';\n\nconst cucumberJson = {\n  \"name\": \"My Features\",\n  \"elements\": [{\n    \"name\": \"Scenario: Passing\",\n    \"steps\": [{\"name\": \"Given a step\", \"result\": {\"status\": \"passed\"}}]\n  }]\n};\n\nformatter(cucumberJson)\n  .pipe(createWriteStream('report.html'));\n","lang":"javascript","description":"Generates an HTML report from Cucumber JSON output and writes to a file."},"warnings":[{"fix":"Use '@cucumber/cucumber' with '--format html' or switch to 'cucumber-html-reporter'.","message":"Package has not been updated since 2016; consider using @cucumber/cucumber's built-in formatter or cucumber-html-reporter.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Use a modern browser or wkhtmltopdf for PDF.","message":"Requires HTML5-compliant browser; may not render correctly in old browsers.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Ensure JSON is produced by a supported Cucumber implementation.","message":"Input JSON must follow Cucumber's JSON format exactly; any deviation may cause errors.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.2.4':20 '2016':28 'cadenc':24 'compliant':32 'convers':42 'cross':5 'cross-platform':4 'cucumb':2,11 'cucumber-html':1 'current':16 'depend':46 'etc':15 'formatt':8,37 'generat':29 'html':3,7 'html5':31 'html5-compliant':30 'implement':12 'javascript':47 'js':14 'jvm':13 'last':25 'low':22 'minimalist':43 'old':35 'pdf':36,41 'platform':6 'releas':23,26 'replac':34 'report':33 'stabl':17 'support':38 'version':18 'wkhtmltopdf':39","created_at":"2026-06-04T18:49:14.618025+00:00","updated_at":"2026-06-04T18:49:14.618025+00:00","problems":[{"fix":"Use `import formatter from 'cucumber-html'` (no curly braces).","cause":"Incorrect import: using named import instead of default.","error":"formatter is not a function"},{"fix":"Run `npm install cucumber-html`.","cause":"Package not installed or missing from package.json.","error":"Cannot find module 'cucumber-html'"},{"fix":"Ensure the JSON object has a 'name' property and 'elements' array with valid scenarios.","cause":"formatter returns a readable stream, but the input object might be missing required properties.","error":"TypeError: formatter(...).pipe is not a function"}],"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":"https://github.com/cucumber/cucumber-html","github":"git://github.com/cucumber/cucumber-html","docs":null,"changelog":null,"pypi":null,"npm":"cucumber-html","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}