8000 Not able to run unleash on cloudflare workers (v8) · Issue #725 · Unleash/unleash-client-node · GitHub
[go: up one dir, main page]

Skip to content
Not able to run unleash on cloudflare workers (v8) #725
@exophunk

Description

@exophunk

Describe the feature request

I want to use unleash together with Gitlab Feature Flags (in a Vue Nuxt.js application). Therefore i created a serverside endpoint in our nuxt app (nuxt runs a nitro server) that uses unleash-client. Everything works flawlessly local.

When I try to deploy it to our Cloudflare pages, the deployment fails with:

Error: Failed to publish your Function. Got error: Uncaught TypeError: Class extends value #<Object> is not a constructor or null
  at chunks/nitro/nitro.mjs:1:222837

I think the reason is that Cloudflare workers run on V8 and not Node.js. Apparently unleash-client relies on some node API's that V8 does not provide and therefore it doesn't work.

Ofc this is not a bug from your side, but I wonder if there is a way to polyfill/fix this or is there another unleash approach to cloudflare?

Or is it impossible to use Unleash together with Cloudflare?

Background

No response

Solution suggestions

No response

Metadata

Metadata

Type

No type

Projects

Status

For later

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0