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
[Error: ENOENT: no such file or directory, open '/var/task/public/images/og/logo.png'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/var/task/public/images/og/logo.png'
}
However in development mode this works as expected
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/practical-brattain-ghlpgf
To Reproduce
Navigate to https://hypermod-a6gx8i6po-codeshiftcommunity.vercel.app/explore/react-19-remove-forwardref and attempt to read opengraph image (https://www.opengraph.xyz/)
Vercel server will log an error stating that it is unable to access static files
However in development mode this works as expected
Using the repo, it needs to be deployed in order to replicate https://codesandbox.io/p/devbox/practical-brattain-ghlpgf
Current vs. Expected behavior
Current behaviour appears to be that the following code does not work as expected since cwd is not the same in prod/dev environments
const interSemiBold = await readFile(join(process.cwd(), 'assets/Inter-SemiBold.ttf'))
My code is as follows:
Provide environment information
Which area(s) are affected? (Select all that apply)
Image (next/image)
Which stage(s) are affected? (Select all that apply)
Vercel (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered: