Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] vercel 部署失败 #4426

Open
bakamake opened this issue Oct 20, 2024 · 6 comments
Open

[Bug] vercel 部署失败 #4426

bakamake opened this issue Oct 20, 2024 · 6 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@bakamake
Copy link

📦 Environment

Vercel

📌 Version

1.22.10

💻 Operating System

Windows

🌐 Browser

Edge

🐛 Bug Description

[16:27:43.466] Running build in Washington, D.C., USA (East) – iad1
[16:27:43.595] Cloning github.com/bakamake/lobe-chat (Branch: main, Commit: d07d8a8)
[16:27:43.940] Previous build cache not available
[16:27:44.653] Cloning completed: 1.057s
[16:27:45.381] Running "vercel build"
[16:27:45.791] Vercel CLI 37.9.0
[16:27:46.800] Running "install" command: bun install...
[16:27:47.040] bun install v1.1.30 (7996d06b)
[16:27:47.054] Resolving dependencies
[16:28:03.481] Resolved, downloaded and extracted [9638]
[16:28:03.481] warn: incorrect peer dependency "[email protected]"
[16:28:03.482]
[16:28:03.482] warn: incorrect peer dependency "[email protected]"
[16:28:03.482]
[16:28:03.482] warn: incorrect peer dependency "[email protected]"
[16:28:03.482]
[16:28:03.482] warn: incorrect peer dependency "@octokit/[email protected]"
[16:28:03.482]
[16:28:03.483] warn: incorrect peer dependency "[email protected]"
[16:28:03.483]
[16:28:03.483] warn: incorrect peer dependency "[email protected]"
[16:28:38.654] Saved lockfile
[16:28:38.654]
[16:28:38.655] $ husky
[16:28:38.715]
[16:28:38.715] + @commitlint/[email protected]
[16:28:38.715] + @edge-runtime/[email protected]
[16:28:38.716] + @huggingface/[email protected]
[16:28:38.716] + @lobehub/[email protected]
[16:28:38.716] + @lobehub/[email protected]
[16:28:38.716] + @lobehub/[email protected]
[16:28:38.716] + @next/[email protected]
[16:28:38.716] + @next/[email protected]
[16:28:38.716] + @peculiar/[email protected]
[16:28:38.716] + @testing-library/[email protected]
[16:28:38.716] + @testing-library/[email protected]
[16:28:38.717] + @types/[email protected]
[16:28:38.717] + @types/[email protected]
[16:28:38.717] + @types/[email protected]
[16:28:38.717] + @types/[email protected]
[16:28:38.717] + @types/[email protected]
[16:28:38.717] + @types/[email protected]
[16:28:38.717] + @types/[email protected]
[16:28:38.717] + @types/[email protected]
[16:28:38.717] + @types/[email protected]
[16:28:38.717] + @types/[email protected]
[16:28:38.718] + @types/[email protected]
[16:28:38.718] + @types/[email protected]
[16:28:38.718] + @types/[email protected]
[16:28:38.718] + @types/[email protected]
[16:28:38.718] + @types/[email protected]
[16:28:38.718] + @types/[email protected]
[16:28:38.718] + @types/[email protected]
[16:28:38.718] + @types/[email protected]
[16:28:38.719] + @types/[email protected]
[16:28:38.719] + @vitest/[email protected]
[16:28:38.719] + [email protected]
[16:28:38.719] + [email protected]
[16:28:38.719] + [email protected]
[16:28:38.719] + [email protected]
[16:28:38.720] + [email protected]
[16:28:38.720] + [email protected]
[16:28:38.720] + [email protected]
[16:28:38.720] + [email protected]
[16:28:38.720] + [email protected]
[16:28:38.720] + [email protected]
[16:28:38.720] + [email protected]
[16:28:38.720] + [email protected]
[16:28:38.721] + [email protected]
[16:28:38.721] + [email protected]
[16:28:38.721] + [email protected]
[16:28:38.722] + [email protected]
[16:28:38.722] + [email protected]
[16:28:38.722] + [email protected]
[16:28:38.722] + [email protected]
[16:28:38.722] + [email protected]
[16:28:38.722] + [email protected]
[16:28:38.722] + [email protected]
[16:28:38.722] + [email protected]
[16:28:38.723] + [email protected]
[16:28:38.723] + [email protected]
[16:28:38.723] + [email protected]
[16:28:38.723] + [email protected]
[16:28:38.723] + [email protected]
[16:28:38.723] + [email protected]
[16:28:38.723] + [email protected]
[16:28:38.723] + [email protected]
[16:28:38.723] + [email protected]
[16:28:38.724] + [email protected]
[16:28:38.724] + [email protected]
[16:28:38.724] + [email protected]
[16:28:38.725] + [email protected]
[16:28:38.725] + @ant-design/[email protected]
[16:28:38.725] + @ant-design/[email protected]
[16:28:38.725] + @anthropic-ai/[email protected]
[16:28:38.725] + @auth/[email protected]
[16:28:38.725] + @aws-sdk/[email protected]
[16:28:38.725] + @aws-sdk/[email protected]
[16:28:38.725] + @aws-sdk/[email protected]
[16:28:38.725] + @azure/[email protected]
[16:28:38.726] + @azure/[email protected]
[16:28:38.726] + @baiducloud/[email protected]
[16:28:38.726] + @cfworker/[email protected]
[16:28:38.726] + @clerk/[email protected]
[16:28:38.726] + @clerk/[email protected]
[16:28:38.726] + @clerk/[email protected]
[16:28:38.726] + @codesandbox/[email protected]
[16:28:38.726] + @cyntler/[email protected]
[16:28:38.726] + @google/[email protected]
[16:28:38.727] + @huggingface/[email protected]
[16:28:38.727] + @icons-pack/[email protected]
[16:28:38.727] + @khmyznikov/[email protected]
[16:28:38.727] + @langchain/[email protected]
[16:28:38.727] + @lobehub/[email protected]
[16:28:38.727] + @lobehub/[email protected]
[16:28:38.727] + @lobehub/[email protected]
[16:28:38.727] + @lobehub/[email protected]
[16:28:38.727] + @lobehub/[email protected]
[16:28:38.727] + @neondatabase/[email protected]
[16:28:38.728] + @next/[email protected]
[16:28:38.731] + @react-spring/[email protected]
[16:28:38.731] + @sentry/[email protected]
[16:28:38.732] + @serwist/[email protected]
[16:28:38.732] + @t3-oss/[email protected]
[16:28:38.732] + @tanstack/[email protected]
[16:28:38.732] + @trpc/[email protected]
[16:28:38.732] + @trpc/[email protected]
[16:28:38.732] + @trpc/[email protected]
[16:28:38.733] + @trpc/[email protected]
[16:28:38.733] + @vercel/[email protected]
[16:28:38.733] + @vercel/[email protected]
[16:28:38.733] + @vercel/[email protected]
[16:28:38.733] + [email protected]
[16:28:38.733] + [email protected]
[16:28:38.733] + [email protected]
[16:28:38.733] + [email protected]
[16:28:38.734] + [email protected]
[16:28:38.734] + [email protected]
[16:28:38.734] + [email protected]
[16:28:38.734] + [email protected]
[16:28:38.734] + [email protected]
[16:28:38.734] + [email protected]
[16:28:38.734] + [email protected]
[16:28:38.734] + [email protected]
[16:28:38.734] + [email protected]
[16:28:38.735] + [email protected]
[16:28:38.735] + [email protected]
[16:28:38.735] + [email protected]
[16:28:38.735] + [email protected]
[16:28:38.735] + [email protected]
[16:28:38.738] + [email protected]
[16:28:38.738] + [email protected]
[16:28:38.738] + [email protected]
[16:28:38.738] + [email protected]
[16:28:38.738] + [email protected]
[16:28:38.738] + [email protected]
[16:28:38.738] + [email protected]
[16:28:38.738] + [email protected]
[16:28:38.738] + [email protected]
[16:28:38.739] + [email protected]
[16:28:38.739] + [email protected]
[16:28:38.739] + [email protected]
[16:28:38.739] + [email protected]
[16:28:38.739] + [email protected]
[16:28:38.739] + [email protected]
[16:28:38.739] + [email protected]
[16:28:38.739] + [email protected]
[16:28:38.739] + [email protected]
[16:28:38.739] + [email protected]
[16:28:38.740] + [email protected]
[16:28:38.740] + [email protected]
[16:28:38.740] + [email protected]
[16:28:38.740] + [email protected]
[16:28:38.740] + [email protected]
[16:28:38.740] + [email protected]
[16:28:38.740] + [email protected]
[16:28:38.740] + [email protected]
[16:28:38.740] + [email protected]
[16:28:38.740] + [email protected]
[16:28:38.740] + [email protected]
[16:28:38.741] + [email protected]
[16:28:38.743] + [email protected]
[16:28:38.743] + [email protected]
[16:28:38.743] + [email protected]
[16:28:38.743] + [email protected]
[16:28:38.744] + [email protected]
[16:28:38.745] + [email protected]
[16:28:38.745] + [email protected]
[16:28:38.745] + [email protected]
[16:28:38.745] + [email protected]
[16:28:38.745] + [email protected]
[16:28:38.745] + [email protected]
[16:28:38.745] + [email protected]
[16:28:38.745] + [email protected]
[16:28:38.745] + [email protected]
[16:28:38.745] + [email protected]
[16:28:38.746] + [email protected]
[16:28:38.746] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.747] + [email protected]
[16:28:38.748] + [email protected]
[16:28:38.748] + [email protected]
[16:28:38.748] + [email protected]
[16:28:38.748] + [email protected]
[16:28:38.748] + [email protected]
[16:28:38.748] + [email protected]
[16:28:38.749] + [email protected]
[16:28:38.749] + [email protected]
[16:28:38.749] + [email protected]
[16:28:38.749] + [email protected]
[16:28:38.749] + [email protected]
[16:28:38.749] + [email protected]
[16:28:38.749] + [email protected]
[16:28:38.749] + [email protected]
[16:28:38.749]
[16:28:38.749] 2614 packages installed [51.72s]
[16:28:38.749]
[16:28:38.749] Blocked 7 postinstalls. Run bun pm untrusted for details.
[16:28:38.786] Detected Next.js version: 14.2.8
[16:28:38.798] Running "bun run build"
[16:28:38.803] $ next build
[16:28:39.656] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[16:28:39.657] This information is used to shape Next.js' roadmap and prioritize features.
[16:28:39.657] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[16:28:39.658] https://nextjs.org/telemetry
[16:28:39.658]
[16:28:39.725] ▲ Next.js 14.2.8
[16:28:39.725]
[16:28:39.825] Creating an optimized production build ...
[16:28:40.447] ○ (serwist) The service worker will not be automatically registered, please call 'window.serwist.register()' in 'componentDidMount' or 'useEffect'.
[16:28:40.454] ✓ (serwist) Bundling the service worker script with the URL '/sw.js' and the scope '/'...
[16:34:34.102] ✓ Compiled successfully
[16:34:34.106] Linting and checking validity of types ...
[16:36:39.069] Collecting page data ...
[16:36:41.572] Error: CLERK_WEBHOOK_SECRET environment variable is missing
[16:36:41.573] at 979979 (/vercel/path0/.next/server/app/(backend)/api/webhooks/clerk/route.js:1:2464)
[16:36:41.573] at t (/vercel/path0/.next/server/webpack-runtime.js:1:143)
[16:36:41.573] at r (/vercel/path0/.next/server/app/(backend)/api/webhooks/clerk/route.js:4:1807)
[16:36:41.574] at /vercel/path0/.next/server/app/(backend)/api/webhooks/clerk/route.js:4:1890
[16:36:41.574] at t.X (/vercel/path0/.next/server/webpack-runtime.js:1:2514)
[16:36:41.574] at /vercel/path0/.next/server/app/(backend)/api/webhooks/clerk/route.js:4:1820
[16:36:41.574] at Object. (/vercel/path0/.next/server/app/(backend)/api/webhooks/clerk/route.js:4:1919)
[16:36:41.575] at Module._compile (node:internal/modules/cjs/loader:1469:14)
[16:36:41.575] at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
[16:36:41.575] at Module.load (node:internal/modules/cjs/loader:1288:32)
[16:36:41.576]
[16:36:41.576] > Build error occurred
[16:36:41.577] Error: Failed to collect page data for /api/webhooks/clerk
[16:36:41.578] at /vercel/path0/node_modules/next/dist/build/utils.js:1268:15
[16:36:41.578] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[16:36:41.579] type: 'Error'
[16:36:41.579] }
[16:36:41.799] error: script "build" exited with code 1
[16:36:41.809] Error: Command "bun run build" exited with 1
[16:36:45.152]

📷 Recurrence Steps

1.refork lobehub/lobe-chat
2.vercel import bakamake/lobe-chat
3set Environment Variables
4doploy
5see the error

🚦 Expected Behavior

successing deploy

📝 Additional Information

No response

@bakamake bakamake added the 🐛 Bug Something isn't working | 缺陷 label Oct 20, 2024
@lobehubbot
Copy link
Member

👀 @bakamake

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Oct 20, 2024

The issue you're encountering with the Vercel deployment of the lobe-chat project is due to the missing CLERK_WEBHOOK_SECRET environment variable. To resolve this, you need to add this environment variable to your Vercel project settings. Here’s how you can do it:

  1. Create and Configure Webhook in Clerk:

    • Go to your Clerk dashboard and create a webhook endpoint for your Vercel project. The endpoint should be something like https://your-project.vercel.app/api/webhooks/clerk.
    • Subscribe to the necessary user events (user.created, user.deleted, user.updated).
  2. Retrieve the Webhook Secret:

    • After creating the webhook, find the webhook secret in the Clerk dashboard. It will be displayed in the bottom right corner of the webhook configuration page.
  3. Add the Webhook Secret to Vercel:

    • Go to your Vercel project settings.
    • Navigate to the "Environment Variables" section.
    • Add a new environment variable with the key CLERK_WEBHOOK_SECRET and the value as the webhook secret you retrieved from Clerk.
CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx

By adding the CLERK_WEBHOOK_SECRET to your Vercel environment variables, you should be able to resolve the deployment failure. Ensure that the URL in the webhook configuration starts with https:// to maintain the integrity of the URL, as this is essential for the webhook to function correctly [1][2].

To continue talking to Dosu, mention @dosu.

@duanxiangchun
Copy link

我也遇到这个问题了

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I also encountered this problem

@arvinxx
Copy link
Contributor

arvinxx commented Oct 21, 2024

有改动代码吗?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Have you changed the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

4 participants