Skip to content

Change https.request with fetch for Cloudflare pages with SSR #1296

@necrogoru

Description

@necrogoru

Rollbar requests from SSR apps in Cloudflare are returning [unenv] https.request is not implemented yet!. I was validating and Cloudflare created a flag for http.request called enable_nodejs_http_modules but is still not working with Rollbar.

Here is the Cloudflare related issue.

Steps taken

  1. Create a Nuxt 3 project
  2. Install Rollbar with pnpm add -D rollbar
  3. Create a server plugin with default setup and log something
  4. Build Nuxt app with Cloudflare preset pnpm build --preset=cloudflare_pages
  5. Start server with Wrangler dev npx wrangler pages dev dist

The same behavior is on production

Versions

Nuxt 3.17.5
Node 22.14.0
Wrangler 4.33.1
Rollbar 2.26.4

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions