Yeah, `queue` handlers don't need to return anything so: `Promise<void>` works well
Yeah,
queue handlers don't need to return anything so: Promise<void> works wellsatisfies operatore introduced in TypeScript 4.9 shouldn't just check that the function matches expect class?batch is of type MessageBatch?ExportedHandler takes other generic types, included one for MessageBatchsatisfies covers most of the function. But the return type being explicit creates better errors for DX.ExportedHandler<Env, MessageBatch> for examplesatisfies Env in the index.ts even tho now that's automatically generated in worker-configuration.d.tswrangler types tho
fetch as : Promise<Response> so ts will catch if you ever accidentally return something elseResponse | Promise<Response> is implied from implements DurableObjectwrangler dev --remote the preview_database_id is used. Perfect! However, when running wrangler dev the preview_database_id is used. wrangler dev the database_id is used.Error: The process '/usr/local/bin/npx' failed with exit code 1. Despite that, on the CF side, it seems to show that the deployments were successful - it shows that the active deployment was made "a few seconds ago". Any thoughts?CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID environment variables
wrangler 3.58.0
-------------------
X [ERROR] Missing entry-point: The entry-point should be specified via the command line (e.g.wrangler deploy path/to/script) or theconfig field.main
wrangler deploy "src/index.js"doesn't work, keeps saying I am missing my entry-point.
wrangler.toml?#:schema node_modules/wrangler/config-schema.json
name = "secretname"
main = "src/index.js"
compatibility_date = "2024-05-29"
[[durable_objects.bindings]]
name = "roomObject"
class_name = "RoomObject"
#[[migrations]]
#tag = "v2"
#renamed_classes = [{from = "MyDurableObject", to = "RoomObject" }] # Array of rename directives
#deleted_classes = ["MyDurableObject"] # Array of deleted class names
[[kv_namespaces]]
binding = "name"
id = "12345"
wrangler deploy "src/index.js"I get:
The entry-point file at "src\index.js" was not found.So it seems like it somehow can't see my files? Even though my project structure hasn't changed
cd srcGives:
Set-Location: Cannot find path 'C:\Data\WranglerProjects\workerProject\src' because it does not exist.
# wrangler.toml
# ...
routes = [
{ pattern = "example.test/api*", zone_name = "example.test" },
{ pattern = "localhost:4321/api*", zone_name = "localhost" },
]d1_databases = [
{ binding = "DB", database_name = "mydb", database_id = "id1", preview_database_id = "id2" },
]d1_databases = [
{ binding = "DB", database_name = "mydb", database_id = "id1" },
]Error: The process '/usr/local/bin/npx' failed with exit code 1CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_IDwrangler deploy path/to/script