Closed lorenzodejong closed 5 months ago
I was able to reproduce this. I assume you're using something like cloudflare warp or a proxy. Turbo v2 expects you to whitelist all environment variables (so called "strict mode"). Here are a couple of workarounds:
turbo.json
to whitelist usage of extra https certs. While this is turbo's recommended way, you'll have to constantly keep this up to date.
@@ -11,7 +11,8 @@
},
"dev": {
"cache": false,
Let me know if this fixes your problem
Hey @threepointone! Thanks for the quick response, you're actually right about the fact that i'm on proxy. I tried out the fix and it works ๐.
And hats off for the amazing work you've done with Partykit around the Cloudflare ecosystem, keep on going!
Which Cloudflare product(s) does this pertain to?
Wrangler core
What version(s) of the tool(s) are you using?
3.60.3 [Wrangler]
What version of Node are you using?
20.12.2
What operating system and version are you using?
MacOS Sonoma 14.5
Describe the Bug
Observed behavior
When initialising a Cloudflare Worker inside of a Turborepo and executing the wrangler development server using
turbo dev
, the Worker is facing issues with async operations.Expected behavior
The Worker executes async operations correctly in Turborepo's task execution.
Steps to reproduce
Example repository: https://github.com/lorenzodejong/worker-fetch-test
pnpm create turbo@latest
cd apps && pnpm create cloudflare@latest
worker-test
for example)Modify the worker
src/index.ts
to include an async fetch call:Execute the worker from the root of the monorepo using
pnpm turbo dev
. Invoke the worker.Observed result:
Please provide a link to a minimal reproduction
https://github.com/lorenzodejong/worker-fetch-test
Please provide any relevant error logs
No response