ex0ns
ex0ns
WWindmill
Created by ex0ns on 5/23/2024 in #help
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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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 method was called, and in CF Workers, process is not something that exists Do you have a workaround to make wmill typescript client work from Cloudflare workers ?
10 replies