Unable to Deploy Unless using CLI Deploy
Hello. I'm able to run and even deploy my app when building locally (e.g.
npx wrangler pages .
and npx wrangler pages deploy .
). However, the automatic deploys runs into an error after build and during deploy due to an error from one of the NPM node_modules. I think it's due to process.stderr
being accessed improperly or being polyfilled improperly by unenv. However, I don't see a way to access the build artifacts that cloudflare creates and so cannot debug this issue. Any help would be appreciated. Thank you.
Removed the other details as I've figured out a workaround. See first response.
Error:
1 Reply
Looks like this is already a bug for this. I'm assuming this impacts all Google npm packages. It is the polyfill for the process and apparently this can be patched out manually as a workaround. https://github.com/googleapis/js-genai/issues/324
GitHub
Issue with importing from
@google/genai/node
fails in Cloudflare ...Problem When importing directly from @google/genai/node in a Cloudflare Worker, the application fails due to limited Node.js compatibility in the Workers environment. The specific error occurs in t...