ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
https://app.nextchat.dev/
MIT License
75.83k stars 58.91k forks source link

[Bug] 构建错误 #5412

Closed chalitbkb closed 3 weeks ago

chalitbkb commented 1 month ago

📦 Deployment Method

Vercel

📌 Version

The latest version I can use is 2.14.2, and after that, I encounter problems.

💻 Operating System

Windows

📌 System Version

11

🌐 Browser

Chrome

📌 Browser Version

last

🐛 Bug Description

I've encountered update issues over the past few days. I've noticed that this failure has been occurring for the last 6 days. The first time the problem arose was on September 7th. I'm not sure if there was any update that caused this impact.

error An unexpected error occurred: "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz: Request failed \"500 Internal Server Error\"".

Error: Command "yarn install" exited with 1

image

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

nextchat-manager[bot] commented 1 month ago

Please follow the issue template to update description of your issue.

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug]

zhanghaotian2018 commented 1 month ago

ypeError: Failed to parse URL from ./prompts.json at new Request (node:internal/deps/undici/undici:4855:19) at i (/data/workspace/ChatGPT-Next-Web/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:177224) ... 2 lines matching cause stack trace ... at async globalThis.fetch (/data/workspace/ChatGPT-Next-Web/.next/server/chunks/712.js:11:131378) { [cause]: TypeError: Invalid URL at new URL (node:internal/url:797:36) at new Request (node:internal/deps/undici/undici:4853:25) at i (/data/workspace/ChatGPT-Next-Web/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:177224) at k (/data/workspace/ChatGPT-Next-Web/.next/server/chunks/712.js:11:134634) at /data/workspace/ChatGPT-Next-Web/.next/server/chunks/712.js:11:136783 at async globalThis.fetch (/data/workspace/ChatGPT-Next-Web/.next/server/chunks/712.js:11:131378) { code: 'ERR_INVALID_URL', input: './prompts.json' }

93-JPG commented 1 month ago

ypeError:无法解析来自 ./prompts.json 的 URL 在新的请求(node:internal/deps/undici/undici:4855:19) 在 i(/data/workspace/ChatGPT-Next-Web/node_modules/next/dist) /compiled/next-server/app-page.runtime.prod.js:12:177224) ... 2 行匹配导致跟踪... 在异步 globalThis.fetch(/data/workspace/ChatGPT-Next-Web/ .next/server/chunks/712.js:11:131378){ [cause]:TypeError: 新 URL(node:internal/url:797:36)处的 URL 无效 在新的请求(node:internal/deps/) undici/undici:4853:25) 在 i (/data/workspace/ChatGPT-Next-Web/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:177224) 位于k(/data/workspace/ChatGPT-Next- Web/.next/server/chunks/712.js:11:134634) 位于 /data/workspace/ChatGPT-Next-Web/.next/server/chunks/712.js:11:136783 位于对齐 globalThis.fetch(/ data/workspace/ChatGPT-Next-Web/.next/server/chunks/712.js:11:131378){ 代码:'ERR_INVALID_URL', 输入:'./prompts.json' }

找不到712.js文件呢

JuliusMoehring commented 1 month ago

I do have the same issue. It can be resolved by not running the fetch call on the server by doing something like:

if (typeof window === "undefined") {
    return;
}