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
Oh, I see what's going on here. I'm trying to detect Vercel and Netlify using env vars, but Cloudflare doesn't like that. I'm going to have to think of a way to do that which doesn't need to import node builtins.
Update: I just modified the base.ts file in node_modules in my own project and that did seem to work. I assume the problem is that it would break in other environments though. I suppose you could take an env object as a parameter and pass it down.
Describe the bug
When the Cloudflare server adapter is used with the Unpic image service in Astro, a build error occurs:
I have tried adding
@unpic/astro
/node:process
to ssr.noExternal, tried setting it as an empty array, all to no avail.To Reproduce
Here is a reproduction of the bug: https://github.com/henrikvtcodes/unpic-cf-ssr-bug-repro
Steps to reproduce the behavior:
Expected behavior
I expected that the project would build with no problems.
Environment
see above reproduction for versions of astro, unpic, etc
Additional context
This problem occurred locally as well as in the Cloudflare deploy process.
The text was updated successfully, but these errors were encountered: