You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to use astro-imagetools with output: "server" mode and vercel adapter to deploy it to vercel but whenever I'm entering the website the serverless function crashes with this specific error:
The problem does not appear in dev only in production deployed in vercel.
UnhandledPromiseRejection{"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: ENOENT: no such file or directory, mkdir
'undefined/'","reason":{"errorType":"Error","errorMessage":
"ENOENT: no such file or directory, mkdir 'undefined/'","code":"ENOENT","errno":-2,"syscall":"mkdir","path":"undefined/","stack":["Error: ENOENT: no such file or directory, mkdir 'undefined/'","
atObject.mkdirSync(node:fs:1396:3)","atfile:///var/task/vercel/path0/dist/chunks/pages/index.astro.1b654532.mjs:424:34"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: ENOENT: no such file or directory, mkdir 'undefined/'","atprocess.<anonymous>(file:///var/runtime/index.mjs:1186:17)"," atprocess.emit(node:events:525:35)"," at emit (node:internal/process/promises:149:20)","
atprocessPromiseRejections(node:internal/process/promises:283:27)","
atprocess.processTicksAndRejections(node:internal/process/task_queues:96:32)"]}UnknownapplicationerroroccurredRuntime.Unknown
I've also been struggling with this in the last hour, and I think it's Vercel's fault. I ended up not using astro-imagetools and moved my images into a /public folder in root and then used the img tag directly.
Something like:
import { Image } from 'astro:assets';
---
<img src={`/images/${proj.img_link}`} alt={proj.name}/>
I wanted to use astro-imagetools with
output: "server"
mode and vercel adapter to deploy it to vercel but whenever I'm entering the website the serverless function crashes with this specific error:The problem does not appear in dev only in production deployed in vercel.
The text was updated successfully, but these errors were encountered: