WindmillWWindmill
Powered by
ex0nsE
Windmill•2y ago•
9 replies
ex0ns

typescript client in cloudflare workers

I was using wmill typescript client from my cloudflare workers but it stopped working today:

✘ [ERROR] service core:user:my-app: Uncaught ReferenceError: process is not defined
cloudflare-backend:dev: 
cloudflare-backend:dev:     at null.<anonymous> (index.js:649:9) in getEnv
cloudflare-backend:dev:     at null.<anonymous> (index.js:653:32) in
cloudflare-backend:dev:   ../../node_modules/.pnpm/windmill-client@1.335.0/node_modules/windmill-client/dist/core/OpenAPI.js
cloudflare-backend:dev:     at null.<anonymous> (index.js:11:50) in __require
cloudflare-backend:dev:     at null.<anonymous> (index.js:7960:21) in
cloudflare-backend:dev:   ../../node_modules/.pnpm/windmill-client@1.335.0/node_modules/windmill-client/dist/index.js
cloudflare-backend:dev:     at null.<anonymous> (index.js:11:50) in __require
cloudflare-backend:dev:     at null.<anonymous> (index.js:31929:21)
cloudflare-backend:dev: 
✘ [ERROR] service core:user:my-app: Uncaught ReferenceError: process is not defined
cloudflare-backend:dev: 
cloudflare-backend:dev:     at null.<anonymous> (index.js:649:9) in getEnv
cloudflare-backend:dev:     at null.<anonymous> (index.js:653:32) in
cloudflare-backend:dev:   ../../node_modules/.pnpm/windmill-client@1.335.0/node_modules/windmill-client/dist/core/OpenAPI.js
cloudflare-backend:dev:     at null.<anonymous> (index.js:11:50) in __require
cloudflare-backend:dev:     at null.<anonymous> (index.js:7960:21) in
cloudflare-backend:dev:   ../../node_modules/.pnpm/windmill-client@1.335.0/node_modules/windmill-client/dist/index.js
cloudflare-backend:dev:     at null.<anonymous> (index.js:11:50) in __require
cloudflare-backend:dev:     at null.<anonymous> (index.js:31929:21)
cloudflare-backend:dev: 


I think that the commit that broke this is https://github.com/windmill-labs/windmill/pull/3714/files#diff-13bcd4e9fc2a785250e31b9122dbedeacc95fe47601feeb1169a0da8c84917a6R8
Before this commit, the lookup in the env was not performed in case the
setClient
setClient
method was called, and in CF Workers,
process
process
is not something that exists

Do you have a workaround to make wmill typescript client work from Cloudflare workers ?
WindmillJoin
3,362Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c · 4d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra · 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 🙂

henri-c · 4w ago

Similar Threads

Workers show up in service logs, but not in the Workers UI
develocoDdeveloco / help
9mo ago
Windmill workers disappeared
Son TungSSon Tung / help
2mo ago
"Bare metal" workers
cmptrCcmptr / help
2y ago
auto scaling workers
pixeleetPpixeleet / help
2y ago