Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default (reporter function)
✓ const reporter = require('eslint-html-reporter');
✗ import reporter from 'eslint-html-reporter';
This package is CommonJS-only; ESM imports via type: module will fail unless using a compatible bundler.
reporter-lite.js
✓ const reporterLite = require('eslint-html-reporter/reporter-lite');
✗ const reporterLite = require('eslint-html-reporter').lite;
The lite reporter is a separate file, not a property of the main module.
reporter-team-city.js
✓ const reporterTeamCity = require('eslint-html-reporter/reporter-team-city');
✗ const reporterTeamCity = require('eslint-html-reporter/teamcity');
The TeamCity reporter file name uses dashes, not camelCase.
reporter-lite-team-city.js
✓ const reporterLLiteTC = require('eslint-html-reporter/reporter-lite-team-city');
✗ const reporterLLiteTC = require('eslint-html-reporter/lite-teamcity');
The lite TeamCity reporter combines both features in a single file.
Shows how to generate an HTML report using the CLI or programmatically with ESLint.
// Install: npm install eslint-html-reporter
// Then run ESLint with the reporter
// bash:
eslint . -f node_modules/eslint-html-reporter/reporter.js -o report.html
// Using programmatically:
const eslint = require('eslint');
const reporter = require('eslint-html-reporter');
const fs = require('fs');
async function main() {
const engine = new eslint.CLIEngine({});
const report = engine.executeOnFiles(['.']);
const results = reporter(report.results);
fs.writeFileSync('report.html', results);
}
main().catch(console.error);
eslint-html-reporter --version
Errors
Common errors & fixes
Error: Cannot find module 'eslint-html-reporter'
Package not installed or installed in wrong location.
fixRun 'npm install eslint-html-reporter --save-dev' and ensure it's in 'node_modules'.
TypeError: reporter is not a function
Incorrect import; the package exports a function but it's being used as an object.
fixUse 'const reporter = require('eslint-html-reporter');' then call 'reporter(results)'. Error: No such file or directory: 'report.html'
Output path is not writable or does not exist.
fixEnsure the output directory exists or use an absolute path.
Audit
Dependencies
No dependency data recorded yet.