All automatic worker deploys through github are failing, but succeeding when run manually
I've set up automatic deployment on pushes to our
If I then go to the
Is this a mistake I made somewhere or an issue with the deployment system?
mainmain branch, but whenever I push to main I get the following build error listing all of my dependencies:Initializing build environment...
Success: Finished initializing build environment
Cloning repository...
Detected the following tools from environment: bun@1.1.33, nodejs@22.9.0
Installing project dependencies: bun install --frozen-lockfile
bun install v1.1.33 (247456b6)
Resolving dependencies
Resolved, downloaded and extracted [2]
+ @cloudflare/workers-types@4.20240925.0
+ @types/jsonpath@0.2.4
+ typescript@5.5.4
+ wrangler@3.83.0
+ @types/deep-diff@1.0.5
+ deep-diff@1.0.2
+ jsonpath@1.1.1
101 packages installed [2.96s]
Executing user deploy command: npx wrangler deploy
⛅️ wrangler 3.83.0
-------------------
✘ [ERROR] Build failed with 165 errors:
✘ [ERROR] Could not resolve "posthog-node"
../components/tracking/posthog/PostHogClient.ts:3:24:
3 │ import { PostHog } from "posthog-node";
╵ ~~~~~~~~~~~~~~
You can mark the path "posthog-node" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "react"
../components/ui/use-toast.ts:2:18:
2 │ import React from "react";
╵ ~~~~~~~
You can mark the path "react" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "zod"
../core/inputs.ts:4:18:
4 │ import { z } from "zod";
╵ ~~~~~
You can mark the path "zod" as external to exclude it from the bundle, which will remove this error.
... (continues with 162 other dependency errors)...Initializing build environment...
Success: Finished initializing build environment
Cloning repository...
Detected the following tools from environment: bun@1.1.33, nodejs@22.9.0
Installing project dependencies: bun install --frozen-lockfile
bun install v1.1.33 (247456b6)
Resolving dependencies
Resolved, downloaded and extracted [2]
+ @cloudflare/workers-types@4.20240925.0
+ @types/jsonpath@0.2.4
+ typescript@5.5.4
+ wrangler@3.83.0
+ @types/deep-diff@1.0.5
+ deep-diff@1.0.2
+ jsonpath@1.1.1
101 packages installed [2.96s]
Executing user deploy command: npx wrangler deploy
⛅️ wrangler 3.83.0
-------------------
✘ [ERROR] Build failed with 165 errors:
✘ [ERROR] Could not resolve "posthog-node"
../components/tracking/posthog/PostHogClient.ts:3:24:
3 │ import { PostHog } from "posthog-node";
╵ ~~~~~~~~~~~~~~
You can mark the path "posthog-node" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "react"
../components/ui/use-toast.ts:2:18:
2 │ import React from "react";
╵ ~~~~~~~
You can mark the path "react" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "zod"
../core/inputs.ts:4:18:
4 │ import { z } from "zod";
╵ ~~~~~
You can mark the path "zod" as external to exclude it from the bundle, which will remove this error.
... (continues with 162 other dependency errors)...If I then go to the
deploymentsdeployments page and deploy manually, the deployment works just fine.Is this a mistake I made somewhere or an issue with the deployment system?