lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
40.96k stars 9.34k forks source link

[Bug] pnpm build sitemap Error #4057

Open Sen-CaPoo opened 5 hours ago

Sen-CaPoo commented 5 hours ago

📦 部署环境

Other

📌 软件版本

1.19.20 從 https://github.com/lobehub/lobe-chat/releases/tag/v1.19.4 開始出現問題

💻 系统环境

Windows

🌐 浏览器

Chrome

🐛 问题描述

執行 pnpm build 後,出現以下錯誤訊息:

next build

▲ Next.js 14.2.8

Creating an optimized production build ... ✓ (pwa) Compiling for server... ✓ (pwa) Compiling for server... ...

./src/store/chat/slices/plugin/action.ts 144:13 Warning: Empty block statement. no-empty

info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules ✓ Linting and checking validity of types ⚠ Using edge runtime on a page currently disables static generation for that page ✓ Collecting page data Generating static pages (5/94) [= ] Error occurred prerendering page "/sitemap/assistants.xml". Read more: https://nextjs.org/docs/messages/prerender-error

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON at JSON.parse () at parseJSONFromBytes (node:internal/deps/undici/undici:4747:19) at successSteps (node:internal/deps/undici/undici:4718:27) at fullyReadBody (node:internal/deps/undici/undici:1433:9) at async specConsumeBody (node:internal/deps/undici/undici:4727:7) at async eT.getAssistantList (E:\UChat-V26\lobe-chat.next\server\chunks\41805.js:1:76946) at async eG.getAssistants (E:\UChat-V26\lobe-chat.next\server\chunks\41805.js:4:697) at async g (E:\UChat-V26\lobe-chat.next\server\app\sitemap[metadata_id__]\route.js:1:1935) at async E:\UChat-V26\lobe-chat\nodemodules.pnpm\next@14.2.8@babel+core@7.23.6_supports-color@8.1.1@opentelemetry+api@1.9.0_react-dom@18.3._itjmu72s7n7tov6po6nkhcdpya\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:36932 at async eC.execute (E:\UChat-V26\lobe-chat\nodemodules.pnpm\next@14.2.8@babel+core@7.23.6_supports-color@8.1.1__@opentelemetry+api@1.9.0_react-dom@18.3._itjmu72s7n7tov6po6nkhcdpya\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:27548) Generating static pages (16/94) [== ] Error occurred prerendering page "/sitemap/plugins.xml". Read more: https://nextjs.org/docs/messages/prerender-error

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON at JSON.parse () at parseJSONFromBytes (node:internal/deps/undici/undici:4747:19) at successSteps (node:internal/deps/undici/undici:4718:27) at fullyReadBody (node:internal/deps/undici/undici:1433:9) at async specConsumeBody (node:internal/deps/undici/undici:4727:7) at async eT.getPluginList (E:\UChat-V26\lobe-chat.next\server\chunks\41805.js:1:78056) at async eG.getPlugins (E:\UChat-V26\lobe-chat.next\server\chunks\41805.js:4:893) at async g (E:\UChat-V26\lobe-chat.next\server\app\sitemap[metadata_id__]\route.js:1:1935) at async E:\UChat-V26\lobe-chat\nodemodules.pnpm\next@14.2.8@babel+core@7.23.6_supports-color@8.1.1@opentelemetry+api@1.9.0_react-dom@18.3._itjmu72s7n7tov6po6nkhcdpya\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:36932 at async eC.execute (E:\UChat-V26\lobe-chat\nodemodules.pnpm\next@14.2.8@babel+core@7.23.6_supports-color@8.1.1__@opentelemetry+api@1.9.0_react-dom@18.3._itjmu72s7n7tov6po6nkhcdpya\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:27548) ✓ Generating static pages (94/94)

Export encountered errors on following paths: /sitemap/[metadata_id]/route: /sitemap/assistants.xml /sitemap/[metadata_id]/route: /sitemap/plugins.xml  ELIFECYCLE  Command failed with exit code 1.

📷 复现步骤

執行 pnpm install 後,接著在執行 pnpm build 命令就會這樣。

🚦 期望结果

No response

📝 补充信息

No response

lobehubbot commented 5 hours ago

👀 @Sen-CaPoo

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

dosubot[bot] commented 5 hours ago

@Sen-CaPoo 你好! 我是Dosu,一个能帮你解决 bug、回答问题,甚至成为贡献者的机器人。我会在等待人类维护者回复你时帮助你。

Hey @Sen-CaPoo! It looks like you're dealing with a tricky pnpm build error related to your sitemap. Unfortunately, I can't help with this specific issue. However, I can assist with solving bugs, answering technical questions, and gathering engineering knowledge. If you think I should have answered this request, feel free to reach out to the Dosu Team.

To continue talking to Dosu, mention @dosu.