ConnectAI-E / AutoGPT-Next-Web

🤖 Assemble, configure, and deploy autonomous AI Agents in your browser.一键免费部署你的私人AutoGPT 网页应用
https://auto-agentgpt.com
GNU General Public License v3.0
2.89k stars 1.41k forks source link

我也遇到了vercel部署错误的问题,但是报错信息不同. #342

Closed karry12138 closed 8 months ago

karry12138 commented 8 months ago
          我也遇到了vercel部署错误的问题,但是报错信息不同.

预期行为

vercel成功部署

当前行为

vercel初次部署即报错。看报错信息,应当不是api key的原因。

日志-报错段(截取自完整日志的末尾的部分,无乱码)

Failed to compile.   ./src/components/MarkdownRenderer.tsx:12:21 Type error: Type '(options?: void | Options | undefined) => void | Transformer<Root, Root>' is not assignable to type 'Pluggable'. Type '(options?: void | Options | undefined) => void | Transformer<Root, Root>' is not assignable to type 'Plugin<any[], any, any>'. Type 'void | Transformer<Root, Root>' is not assignable to type 'void | Transformer<any, any> | undefined'. Type 'Transformer<Root, Root>' is not assignable to type 'void | Transformer<any, any> | undefined'. Type 'Transformer<Root, Root>' is not assignable to type 'Transformer<any, any>'. Types of parameters 'file' and 'file' are incompatible. Type 'import("/vercel/path0/node_modules/remark-rehype/node_modules/vfile/lib/index").VFile' is not assignable to type 'import("/vercel/path0/node_modules/vfile/lib/index").VFile'. Types of property 'messages' are incompatible. Type 'import("/vercel/path0/node_modules/remark-rehype/node_modules/vfile-message/lib/index").VFileMessage[]' is not assignable to type 'import("/vercel/path0/node_modules/vfile-message/lib/index").VFileMessage[]'. Property 'position' is missing in type 'import("/vercel/path0/node_modules/remark-rehype/node_modules/vfile-message/lib/index").VFileMessage' but required in type 'import("/vercel/path0/node_modules/vfile-message/lib/index").VFileMessage'.


    10 \|   <ReactMarkdown
     11 \|     remarkPlugins={[remarkGfm]}
>  12 \|     rehypePlugins={[rehypeHighlight]}
     \|                     ^
    13 \|     components={{
    14 \|       pre: CustomPre,
    15 \|       code: CustomCodeBlock,
Error: Command "npm run build" exited with 1

#

完整日志信息

[10:13:59.326] Running "vercel build" [10:13:59.772] Vercel CLI 32.4.1 [10:14:00.107] Warning: Detected "engines": { "node": ">=18.0.0" } in your `package.json` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version [10:14:00.126] Installing dependencies... [10:14:07.920] npm WARN deprecated @types/prettier@3.0.0: This is a stub types definition. prettier provides its own type definitions, so you do not need this installed. [10:14:26.097] [10:14:26.098] > auto-gpt-next-web@1.0.0 postinstall [10:14:26.098] > prisma generate [10:14:26.098] [10:14:28.276] Prisma schema loaded from prisma/schema.prisma [10:14:28.833] [10:14:28.833] ✔ Generated Prisma Client (v5.4.2) to ./node_modules/@prisma/client in 115ms [10:14:28.834] Start using Prisma Client in Node.js (See: https://pris.ly/d/client) [10:14:28.834] ``` [10:14:28.834] import { PrismaClient } from '@prisma/client' [10:14:28.834] const prisma = new PrismaClient() [10:14:28.834] ``` [10:14:28.834] or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate) [10:14:28.834] ``` [10:14:28.834] import { PrismaClient } from '@prisma/client/edge' [10:14:28.834] const prisma = new PrismaClient() [10:14:28.834] ``` [10:14:28.834] [10:14:28.835] See other ways of importing Prisma Client: http://pris.ly/d/importing-client [10:14:28.835] [10:14:28.835] [10:14:28.835] warn Versions of prisma@5.2.0 and @prisma/client@5.4.2 don't match. [10:14:28.835] This might lead to unexpected behavior. [10:14:28.835] Please make sure they have the same version. [10:14:28.865] [10:14:28.866] > auto-gpt-next-web@1.0.0 prepare [10:14:28.866] > husky install [10:14:28.866] [10:14:28.959] husky - Git hooks installed [10:14:28.986] [10:14:28.986] added 1203 packages in 29s [10:14:28.986] [10:14:28.987] 300 packages are looking for funding [10:14:28.987] run `npm fund` for details [10:14:29.021] Detected Next.js version: 13.5.5 [10:14:29.030] Detected `package-lock.json` generated by npm 7+ [10:14:29.031] Running "npm run build" [10:14:29.464] [10:14:29.464] > auto-gpt-next-web@1.0.0 build [10:14:29.464] > next build --no-lint [10:14:29.464] [10:14:29.971] ⚠ Linting is disabled [10:14:30.141] Attention: Next.js now collects completely anonymous telemetry regarding usage. [10:14:30.141] This information is used to shape Next.js' roadmap and prioritize features. [10:14:30.141] 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: [10:14:30.141] https://nextjs.org/telemetry [10:14:30.141] [10:14:30.232] Checking validity of types ... [10:14:38.047] Failed to compile. [10:14:38.047] [10:14:38.047] ./src/components/MarkdownRenderer.tsx:12:21 [10:14:38.047] Type error: Type '(options?: void | Options | undefined) => void | Transformer' is not assignable to type 'Pluggable'. [10:14:38.047] Type '(options?: void | Options | undefined) => void | Transformer' is not assignable to type 'Plugin'. [10:14:38.047] Type 'void | Transformer' is not assignable to type 'void | Transformer | undefined'. [10:14:38.047] Type 'Transformer' is not assignable to type 'void | Transformer | undefined'. [10:14:38.047] Type 'Transformer' is not assignable to type 'Transformer'. [10:14:38.048] Types of parameters 'file' and 'file' are incompatible. [10:14:38.048] Type 'import("/vercel/path0/node_modules/remark-rehype/node_modules/vfile/lib/index").VFile' is not assignable to type 'import("/vercel/path0/node_modules/vfile/lib/index").VFile'. [10:14:38.048] Types of property 'messages' are incompatible. [10:14:38.048] Type 'import("/vercel/path0/node_modules/remark-rehype/node_modules/vfile-message/lib/index").VFileMessage[]' is not assignable to type 'import("/vercel/path0/node_modules/vfile-message/lib/index").VFileMessage[]'. [10:14:38.048] Property 'position' is missing in type 'import("/vercel/path0/node_modules/remark-rehype/node_modules/vfile-message/lib/index").VFileMessage' but required in type 'import("/vercel/path0/node_modules/vfile-message/lib/index").VFileMessage'. [10:14:38.048] [10:14:38.048]   10 |  <ReactMarkdown [10:14:38.048]   11 |  remarkPlugins={[remarkGfm]} [10:14:38.048] > 12 |  rehypePlugins={[rehypeHighlight]} [10:14:38.048]   |  ^ [10:14:38.049]   13 |  components={{ [10:14:38.049]   14 |  pre: CustomPre, [10:14:38.049]   15 |  code: CustomCodeBlock, [10:14:38.105] Error: Command "npm run build" exited with 1

重现步骤

20231031 Go to Project Page click on deploy add project name 添加环境变量 openapi key wait for deployment error message

即使我另外手动fork项目最新的main分支,并在vercel项目中修改git到此项目,报错依旧。

Originally posted by @karry12138 in https://github.com/ConnectAI-E/AutoGPT-Next-Web/issues/228#issuecomment-1786350321

Dogtiti commented 8 months ago

343

karry12138 commented 8 months ago

thanks