highcharts / highcharts/node-export-server

[Pupeteer] AWS Lambda EROFS in .cache

Open
#414 12 comments 1 reaction 0 assignees View on GitHub
enhancement environment issue
Dominant language
JavaScript
Stars
369
Forks
266
PR merge metrics
No merged PRs in 30d

Description

Currently when I'm trying to run the export server with AWS Lambda using the new enhancement/pupeteer branch, the generation of graph fails because it's trying to create a folder in `/var/task/node_modules/highcharts-export-server/.cache`

The AWS Lambda function is running with node18.x runtime and with the latest highcharts version. package.json version has been fixed as so:
`"highcharts-export-server": "github:highcharts/node-export-server#2a5d8df3d1e2f0b11a7984c55501507fd70d78a6"` which has been suggested as the latest PR simplifies using it as a node module.

#### Expected behaviour
A very nice graph through AWS Lambda

#### Actual behaviour
Error message:
```
{
"errorType":"Error",
"errorMessage":"EROFS: read-only file system, mkdir '/var/task/node_modules/highcharts-export-server/.cache'",
"trace":[
"Error: EROFS: read-only file system, mkdir '/var/task/node_modules/highcharts-export-server/.cache'",
" at mkdirSync (node:fs:1398:3)",
" at checkCache (file:///var/task/node_modules/highcharts-export-server/lib/cache.js:219:29)",
" at Object.initPool (file:///var/task/node_modules/highcharts-export-server/lib/index.js:57:11)",
" at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
" at async createGraph (file:///var/task/functions/coingecko/chartGraph.mjs:13568:3)",
" at async Runtime.getSparkline [as handler] (file:///var/task/functions/coingecko/chartGraph.mjs:13650:17)"
]
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.