Open bakamake opened 6 days ago
๐ @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ใๆไปฌไผๅฐฝๅฟซ่ฐๆฅๆญคไบ๏ผๅนถๅฐฝๅฟซๅๅคๆจใ ่ฏท็กฎไฟๆจๅทฒ็ปๆไพไบๅฐฝๅฏ่ฝๅค็่ๆฏไฟกๆฏใ
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:
Create and Configure Webhook in Clerk:
https://your-project.vercel.app/api/webhooks/clerk
.user.created
, user.deleted
, user.updated
).Retrieve the Webhook Secret:
Add the Webhook Secret to Vercel:
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.
ๆไน้ๅฐ่ฟไธช้ฎ้ขไบ
Bot detected the issue body's language is not English, translate it automatically. ๐ฏ๐ญ๐ป๐งโ๐คโ๐ง๐ซ๐ง๐ฟโ๐คโ๐ง๐ป๐ฉ๐พโ๐คโ๐จ๐ฟ๐ฌ๐ฟ
I also encountered this problem
ๆๆนๅจไปฃ็ ๅ๏ผ
Bot detected the issue body's language is not English, translate it automatically. ๐ฏ๐ญ๐ป๐งโ๐คโ๐ง๐ซ๐ง๐ฟโ๐คโ๐ง๐ป๐ฉ๐พโ๐คโ๐จ๐ฟ๐ฌ๐ฟ
Have you changed the code?
๐ฆ 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: (/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]
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 "eslint@8.57.1" [16:28:03.482] [16:28:03.482] warn: incorrect peer dependency "stylelint@15.11.0" [16:28:03.482] [16:28:03.482] warn: incorrect peer dependency "stylelint@15.11.0" [16:28:03.482] [16:28:03.482] warn: incorrect peer dependency "@octokit/core@5.2.0" [16:28:03.482] [16:28:03.483] warn: incorrect peer dependency "stylelint@15.11.0" [16:28:03.483] [16:28:03.483] warn: incorrect peer dependency "stylelint@15.11.0" [16:28:38.654] Saved lockfile [16:28:38.654] [16:28:38.655] $ husky [16:28:38.715] [16:28:38.715] + @commitlint/cli@19.5.0 [16:28:38.715] + @edge-runtime/vm@4.0.3 [16:28:38.716] + @huggingface/tasks@0.12.22 [16:28:38.716] + @lobehub/i18n-cli@1.20.0 [16:28:38.716] + @lobehub/lint@1.24.4 [16:28:38.716] + @lobehub/seo-cli@1.4.2 [16:28:38.716] + @next/bundle-analyzer@14.2.15 [16:28:38.716] + @next/eslint-plugin-next@14.2.15 [16:28:38.716] + @peculiar/webcrypto@1.5.0 [16:28:38.716] + @testing-library/jest-dom@6.6.2 [16:28:38.716] + @testing-library/react@16.0.1 [16:28:38.717] + @types/chroma-js@2.4.4 [16:28:38.717] + @types/debug@4.1.12 [16:28:38.717] + @types/diff@5.2.3 [16:28:38.717] + @types/ip@1.1.3 [16:28:38.717] + @types/json-schema@7.0.15 [16:28:38.717] + @types/lodash@4.17.12 [16:28:38.717] + @types/lodash-es@4.17.12 [16:28:38.717] + @types/node@20.16.13 [16:28:38.717] + @types/numeral@2.0.5 [16:28:38.717] + @types/pg@8.11.10 [16:28:38.718] + @types/react@18.3.11 [16:28:38.718] + @types/react-dom@18.3.1 [16:28:38.718] + @types/rtl-detect@1.0.3 [16:28:38.718] + @types/semver@7.5.8 [16:28:38.718] + @types/systemjs@6.15.1 [16:28:38.718] + @types/ua-parser-js@0.7.39 [16:28:38.718] + @types/unist@3.0.3 [16:28:38.718] + @types/uuid@10.0.0 [16:28:38.719] + @types/ws@8.5.12 [16:28:38.719] + @vitest/coverage-v8@1.2.2 [16:28:38.719] + ajv-keywords@5.1.0 [16:28:38.719] + commitlint@19.5.0 [16:28:38.719] + consola@3.2.3 [16:28:38.719] + dotenv@16.4.5 [16:28:38.720] + dpdm@3.14.0 [16:28:38.720] + drizzle-kit@0.25.0 [16:28:38.720] + eslint@8.57.1 [16:28:38.720] + eslint-plugin-mdx@2.3.4 [16:28:38.720] + eslint-plugin-unused-imports@4.0.1 [16:28:38.720] + fake-indexeddb@6.0.0 [16:28:38.720] + glob@11.0.0 [16:28:38.720] + gray-matter@4.0.3 [16:28:38.721] + happy-dom@15.7.4 [16:28:38.721] + husky@9.1.6 [16:28:38.721] + just-diff@6.0.2 [16:28:38.722] + lint-staged@15.2.10 [16:28:38.722] + lodash@4.17.21 [16:28:38.722] + markdown-table@3.0.3 [16:28:38.722] + node-fetch@3.3.2 [16:28:38.722] + node-gyp@10.2.0 [16:28:38.722] + openapi-typescript@6.7.6 [16:28:38.722] + p-map@7.0.2 [16:28:38.722] + prettier@3.3.3 [16:28:38.723] + remark-cli@11.0.0 [16:28:38.723] + remark-parse@10.0.2 [16:28:38.723] + semantic-release@21.1.2 [16:28:38.723] + serwist@9.0.9 [16:28:38.723] + stylelint@15.11.0 [16:28:38.723] + supports-color@8.1.1 [16:28:38.723] + tsx@4.19.1 [16:28:38.723] + typescript@5.6.3 [16:28:38.723] + unified@11.0.5 [16:28:38.724] + unist-util-visit@5.0.0 [16:28:38.724] + vite@5.4.9 [16:28:38.724] + vitest@1.2.2 [16:28:38.725] + vitest-canvas-mock@0.3.3 [16:28:38.725] + @ant-design/icons@5.5.1 [16:28:38.725] + @ant-design/pro-components@2.7.18 [16:28:38.725] + @anthropic-ai/sdk@0.29.2 [16:28:38.725] + @auth/core@0.34.2 [16:28:38.725] + @aws-sdk/client-bedrock-runtime@3.675.0 [16:28:38.725] + @aws-sdk/client-s3@3.675.0 [16:28:38.725] + @aws-sdk/s3-request-presigner@3.675.0 [16:28:38.725] + @azure/core-rest-pipeline@1.16.0 [16:28:38.726] + @azure/openai@1.0.0-beta.12 [16:28:38.726] + @baiducloud/qianfan@0.1.9 [16:28:38.726] + @cfworker/json-schema@2.0.1 [16:28:38.726] + @clerk/localizations@3.3.0 [16:28:38.726] + @clerk/nextjs@5.7.5 [16:28:38.726] + @clerk/themes@2.1.37 [16:28:38.726] + @codesandbox/sandpack-react@2.19.9 [16:28:38.726] + @cyntler/react-doc-viewer@1.17.0 [16:28:38.726] + @google/generative-ai@0.16.1 [16:28:38.727] + @huggingface/inference@2.8.1 [16:28:38.727] + @icons-pack/react-simple-icons@9.6.0 [16:28:38.727] + @khmyznikov/pwa-install@0.3.9 [16:28:38.727] + @langchain/community@0.2.33 [16:28:38.727] + @lobehub/chat-plugin-sdk@1.32.4 [16:28:38.727] + @lobehub/chat-plugins-gateway@1.9.0 [16:28:38.727] + @lobehub/icons@1.35.4 [16:28:38.727] + @lobehub/tts@1.25.1 [16:28:38.727] + @lobehub/ui@1.151.5 [16:28:38.727] + @neondatabase/serverless@0.10.1 [16:28:38.728] + @next/third-parties@14.2.15 [16:28:38.731] + @react-spring/web@9.7.5 [16:28:38.731] + @sentry/nextjs@7.119.2 [16:28:38.732] + @serwist/next@9.0.9 [16:28:38.732] + @t3-oss/env-nextjs@0.11.1 [16:28:38.732] + @tanstack/react-query@5.59.15 [16:28:38.732] + @trpc/client@11.0.0-rc.589 [16:28:38.732] + @trpc/next@11.0.0-rc.589 [16:28:38.732] + @trpc/react-query@11.0.0-rc.589 [16:28:38.733] + @trpc/server@11.0.0-rc.589 [16:28:38.733] + @vercel/analytics@1.3.1 [16:28:38.733] + @vercel/edge-config@1.3.0 [16:28:38.733] + @vercel/speed-insights@1.0.12 [16:28:38.733] + ahooks@3.8.1 [16:28:38.733] + ai@3.4.16 [16:28:38.733] + antd@5.21.4 [16:28:38.733] + antd-style@3.7.0 [16:28:38.734] + brotli-wasm@3.0.1 [16:28:38.734] + chroma-js@2.6.0 [16:28:38.734] + dayjs@1.11.13 [16:28:38.734] + debug@4.3.7 [16:28:38.734] + dexie@3.2.7 [16:28:38.734] + diff@5.2.0 [16:28:38.734] + drizzle-orm@0.34.1 [16:28:38.734] + drizzle-zod@0.5.1 [16:28:38.734] + fast-deep-equal@3.1.3 [16:28:38.735] + file-type@19.6.0 [16:28:38.735] + framer-motion@11.11.9 [16:28:38.735] + gpt-tokenizer@2.5.0 [16:28:38.735] + i18next@23.16.1 [16:28:38.735] + i18next-browser-languagedetector@7.2.1 [16:28:38.738] + i18next-resources-to-backend@1.2.1 [16:28:38.738] + idb-keyval@6.2.1 [16:28:38.738] + immer@10.1.1 [16:28:38.738] + ip@2.0.1 [16:28:38.738] + jose@5.9.4 [16:28:38.738] + js-sha256@0.11.0 [16:28:38.738] + jsonl-parse-stringify@1.0.3 [16:28:38.738] + langchain@0.3.2 [16:28:38.738] + langfuse@3.27.0 [16:28:38.739] + langfuse-core@3.27.0 [16:28:38.739] + lodash-es@4.17.21 [16:28:38.739] + lucide-react@0.453.0 [16:28:38.739] + mammoth@1.8.0 [16:28:38.739] + modern-screenshot@4.4.39 [16:28:38.739] + nanoid@5.0.7 [16:28:38.739] + next@14.2.8 [16:28:38.739] + next-auth@5.0.0-beta.25 [16:28:38.739] + next-mdx-remote@4.4.1 [16:28:38.739] + nextjs-toploader@3.7.15 [16:28:38.740] + numeral@2.0.6 [16:28:38.740] + nuqs@1.20.0 [16:28:38.740] + officeparser@4.2.0 [16:28:38.740] + ollama@0.5.9 [16:28:38.740] + openai@4.68.1 [16:28:38.740] + openapi-fetch@0.9.8 [16:28:38.740] + partial-json@0.1.7 [16:28:38.740] + pdf-parse@1.1.1 [16:28:38.740] + pdfjs-dist@4.4.168 [16:28:38.740] + pg@8.13.0 [16:28:38.740] + pino@9.5.0 [16:28:38.741] + polished@4.3.1 [16:28:38.743] + posthog-js@1.174.2 [16:28:38.743] + pwa-install-handler@2.6.1 [16:28:38.743] + query-string@9.1.1 [16:28:38.743] + random-words@2.0.1 [16:28:38.744] + react@18.3.1 [16:28:38.745] + react-confetti@6.1.0 [16:28:38.745] + react-dom@18.3.1 [16:28:38.745] + react-fast-marquee@1.6.5 [16:28:38.745] + react-hotkeys-hook@4.5.1 [16:28:38.745] + react-i18next@14.0.2 [16:28:38.745] + react-layout-kit@1.9.0 [16:28:38.745] + react-lazy-load@4.0.1 [16:28:38.745] + react-pdf@9.1.1 [16:28:38.745] + react-virtuoso@4.12.0 [16:28:38.745] + react-wrap-balancer@1.1.1 [16:28:38.746] + remark@14.0.3 [16:28:38.746] + remark-gfm@3.0.1 [16:28:38.747] + remark-html@15.0.2 [16:28:38.747] + request-filtering-agent@2.0.1 [16:28:38.747] + resolve-accept-language@3.1.8 [16:28:38.747] + rtl-detect@1.1.2 [16:28:38.747] + semver@7.6.3 [16:28:38.747] + sharp@0.33.5 [16:28:38.747] + shiki@1.22.0 [16:28:38.747] + stripe@15.12.0 [16:28:38.747] + superjson@2.2.1 [16:28:38.747] + svix@1.37.0 [16:28:38.747] + swr@2.2.5 [16:28:38.747] + systemjs@6.15.1 [16:28:38.747] + ts-md5@1.3.1 [16:28:38.748] + ua-parser-js@1.0.39 [16:28:38.748] + unstructured-client@0.18.1 [16:28:38.748] + url-join@5.0.0 [16:28:38.748] + use-merge-value@1.2.0 [16:28:38.748] + utility-types@3.11.0 [16:28:38.748] + uuid@10.0.0 [16:28:38.749] + ws@8.18.0 [16:28:38.749] + y-protocols@1.0.6 [16:28:38.749] + y-webrtc@10.3.0 [16:28:38.749] + yaml@2.6.0 [16:28:38.749] + yjs@13.6.20 [16:28:38.749] + zod@3.23.8 [16:28:38.749] + zustand@4.5.5 [16:28:38.749] + zustand-utils@1.3.2 [16:28:38.749] [16:28:38.749] 2614 packages installed [51.72s] [16:28:38.749] [16:28:38.749] Blocked 7 postinstalls. Runbun 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.๐ท 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