(i'm leaning towards as a bug as it's an assertion error and not a explicit error being thrown)
(i'm leaning towards as a bug as it's an assertion error and not a explicit error being thrown)


wrangler dev --env dev causes service binding to freak out and screams Cannot access '{functionName}' as we couldn't find a 'wrangler dev' session for service "{service}" to proxy to..dev.vars! yes, it's not meant for local dev and more for secrets; but percisely, you can use this to your advandage that the value of .dev.vars is local to your machine! .dev.vars and with an environment variable to indicate it's in development)process.env.NODE_ENV === 'development' which should be a simple implementationnode:process was introduced into the runtime (recent = months/years). If they had added this at the same time, then existing code that checks for NODE_ENV to determine whether it's running in Workers or Node would break process.env.WORKER_ENV or a standalone global variable since env is per fetch and not global, so it be also nice to check this can be checked globally sometimes, I guess?app.Environment.IsDevelopment() in ASP like webservers), I was sort of bummed out that the official way to detect development/staging/prod is via [env], which comes with a whole baggage of concerns like non inherit keys; and also aformentioned bug about not find the session (I'll write up a bug report for it :/)
wrangler dev --env devCannot access '{functionName}' as we couldn't find a 'wrangler dev' session for service "{service}" to proxy to.process.env.NODE_ENV === 'development'node:processNODE_ENVprocess.env.WORKER_ENVapp.Environment.IsDevelopment()2024-11-10T16:59:08.974Z Initializing build environment...
2024-11-10T16:59:18.008Z Success: Finished initializing build environment
2024-11-10T16:59:18.360Z Cloning repository...
2024-11-10T17:19:08.252Z Build was timed out