@nuxtjs/supabase deploy problem on cloudflare

I've got a problem with a nuxt project, which doesn't seem to deploy on cloudflare the moment @nuxt/supabase is added to the project.


The deployment always ends with the following lines:
20:19:18.601    ✨ Compiled Worker successfully
20:19:18.655    Found _routes.json in output directory. Uploading.
20:19:18.668    Validating asset output directory
20:19:27.353    Success: Assets published!
20:19:28.628    Error: Failed to publish your Function. Got error: Uncaught ReferenceError: global is not defined
  at chunks/runtime.mjs:1:30918


Interestingly, this is only happening when using pnpm.
the same exact project/setup with yarn does seem to work just fine.

All dependencies and pnpm are uptodate - and all issues i found about this are from mid-2023 - which i'd hope would've removed this in the meantime.

---
An very minimal example project is here: https://github.com/xmatthias/nuxt_supabase_deploy_test
as the commit history shows - i did experiment quite a bit with it ...
Was this page helpful?