Hi,
I am building a site with Eleventy with serveless plugin to render dynamic data.
Works locally but when deploying to Netlify I see this error
Runtime.UnhandledPromiseRejection: Error: ENOENT: no such file or directory, mkdir '.cache'
at process.<anonymous> (file:///var/runtime/index.mjs:1186:17)
at process.emit (node:events:513:28)
at emit (node:internal/process/promises:149:20)
at processPromiseRejections (node:internal/process/promises:283:27)
at process.processTicksAndRejections (node:internal/process/task_queues:96:32)
Asked Netlify for support and they replied that .cache is not a writable directory in AWS Lambda - data can be written to /tmp. And suggested to file an issue here.
My code for serveless plugin (mostly copied from documentation)
Operating system
Ubuntu
Eleventy
2.0.1
Describe the bug
Hi, I am building a site with Eleventy with serveless plugin to render dynamic data. Works locally but when deploying to Netlify I see this error
Asked Netlify for support and they replied that .cache is not a writable directory in AWS Lambda - data can be written to /tmp. And suggested to file an issue here.
My code for serveless plugin (mostly copied from documentation)
// Serverless eleventyConfig.addPlugin(EleventyServerlessBundlerPlugin, { name: 'onrequest', functionsDir: './netlify/functions/', copy: [ { from: '.cache', to: 'cache' } ] });
Does anyone know how to fix this? Thanks
Reproduction steps
Expected behavior
Reproduction URL
Screenshots
No response