@nestjsforge/echarts
Installation
Install @nestjsforge/echarts and its peer dependencies.
Install the package using your preferred package manager:
npm install @nestjsforge/echartsPeer Dependencies
The package requires the following peer dependencies:
| Package | Version | Required |
|---|---|---|
| @nestjs/common | >=10.0.0 | Yes |
| @nestjs/core | >=10.0.0 | Yes |
| puppeteer | >=21.0.0 | Yes |
| echarts | >=5.4.0 | Yes |
| reflect-metadata | >=0.1.13 | Yes |
| rxjs | >=7.0.0 | Yes |
npm install puppeteer echartsPuppeteer Setup
ℹ
Puppeteer downloads Chromium on first install. In CI or Docker environments, you may need to configure the executable path or install browser dependencies separately.
In restricted environments (Docker, CI), pass executablePath to point to an existing Chrome/Chromium installation:
EChartsModule.forRoot({
poolSize: 1,
puppeteerOptions: {
executablePath: '/usr/bin/chromium-browser',
args: ['--no-sandbox', '--disable-setuid-sandbox'],
},
})TypeScript Configuration
Ensure experimentalDecorators and emitDecoratorMetadata are enabled in your tsconfig.json:
{
"compilerOptions": {
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"strict": true
}
}