memochou1993 / gpt-ai-assistant

OpenAI + LINE + Vercel = GPT AI Assistant
https://memochou1993.github.io/gpt-ai-assistant-docs/
MIT License
7.23k stars 9.33k forks source link

This Serverless Function has crashed. #295

Open Ellie1568 opened 11 months ago

Ellie1568 commented 11 months ago

您好,之前有測試成功,回來就一直錯誤了!自己研究了好久,還是無解,重新安裝好幾次都一樣 目前出現以下 This Serverless Function has crashed.

Your connection is working correctly.

Vercel is working correctly.

500: INTERNAL_SERVER_ERROR Code: FUNCTION_INVOCATION_FAILED ID: hkg1::c9m5q-1695875827908-b1eca027d40d

If you are a visitor, contact the website owner or try again later. If you are the owner, learn how to fix the error and check the logs.

用了不同vercel帳號,也是一樣,請問我應該怎麼辦呢?

EllieMamiya commented 11 months ago

補充

[GET]

/

Time September 28 13:07:59.43 GMT+08:00 Request Path gpt-ai-assistant-ochre-ten.vercel.app/ Status Code 500 Host gpt-ai-assistant-ochre-ten.vercel.app Request ID lhswj-1695877680428-4b86f624b55c Request User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Level Error

Environment production Branch main Cache MISS Type Serverless Function

Function /api Memory Used / Limit 21 MB / 1024 MB

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/node_modules/opencc-js/dist/esm/full.js' imported from /var/task/utils/convert-text.js Did you mean to import opencc-js/dist/umd/full.js? at new NodeError (node:internal/errors:405:5) at finalizeResolution (node:internal/modules/esm/resolve:329:11) at moduleResolve (node:internal/modules/esm/resolve:992:10) at moduleResolveWithNodePath (node:internal/modules/esm/resolve:936:12) at defaultResolve (node:internal/modules/esm/resolve:1178:79) at nextResolve (node:internal/modules/esm/loader:163:28) at ESMLoader.resolve (node:internal/modules/esm/loader:835:30) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18) at ModuleWrap. (node:internal/modules/esm/module_job:77:40) at link (node:internal/modules/esm/module_job:76:36) { code: 'ERR_MODULE_NOT_FOUND' } Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/node_modules/opencc-js/dist/esm/full.js' imported from /var/task/utils/convert-text.js Did you mean to import opencc-js/dist/umd/full.js? at new NodeError (node:internal/errors:405:5) at finalizeResolution (node:internal/modules/esm/resolve:329:11) at moduleResolve (node:internal/modules/esm/resolve:992:10) at moduleResolveWithNodePath (node:internal/modules/esm/resolve:936:12) at defaultResolve (node:internal/modules/esm/resolve:1178:79) at nextResolve (node:internal/modules/esm/loader:163:28) at ESMLoader.resolve (node:internal/modules/esm/loader:835:30) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18) at ModuleWrap. (node:internal/modules/esm/module_job:77:40) at link (node:internal/modules/esm/module_job:76:36) { code: 'ERR_MODULE_NOT_FOUND' } Error: Runtime exited with error: exit status 1 Runtime.ExitError

memochou1993 commented 11 months ago

@Ellie1568

請問你是刪除 Vercel 上的舊專案,然後重新 import 一次嗎?

Ellie1568 commented 11 months ago

是的!

Memo Chou @.***> 於 2023年9月30日 週六 18:57 寫道:

@Ellie1568 https://github.com/Ellie1568

請問你是刪除 Vercel 上的舊專案,然後重新 import 一次嗎?

— Reply to this email directly, view it on GitHub https://github.com/memochou1993/gpt-ai-assistant/issues/295#issuecomment-1741740240, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCWSKZCH3CFF5X556YJOOD3X473KNANCNFSM6AAAAAA5KLFNN4 . You are receiving this because you were mentioned.Message ID: @.***>

memochou1993 commented 11 months ago

@Ellie1568

部署後的網址長什麼樣子呢?

yichungcheng commented 11 months ago

I have same issue with him/her. 部屬後domain : https://gpt-ai-assistant-theta-ebon.vercel.app/ 也去Line develop上頭更新過 但就跟@Ellie1568一樣,看到一樣的error message @Ellie1568 部屬的網址 : https://gpt-ai-assistant-ochre-ten.vercel.app/

memochou1993 commented 11 months ago

@Ellie1568 @yichungcheng

嗨。

看起來是 Vercel CLI 出了問題,請大家在 Vercel 加上以下環境變數,並且重新部署。

VERCEL_CLI_VERSION = vercel@32.2.5
image

Related issue: https://github.com/vercel/vercel/issues/10564

yichungcheng commented 11 months ago

@memochou1993 thank you, 設定新的parameter之後,重新deploy就可以了

Ellie1568 commented 10 months ago

@memochou1993 謝謝,完成修復了!正常運作中

yujieChen0924 commented 7 months ago

您好,除了"缺少環境變數:SERPAPI_API_KEY",還有出現"Request failed with status code 429",想請問可以怎麼解決? (429 - Rate limit reached for requests | Cause: You are sending requests too quickly. Solution: Pace your requests. Read the Rate limit guide.) 謝謝!

螢幕擷取畫面 2024-01-11 093347 螢幕擷取畫面 2024-01-11 093128

429 - Rate limit reached for requests Cause: You are sending requests too quickly. Solution: Pace your requests. Read the Rate limit guide.

memochou1993 commented 5 months ago

@yujieChen0924

SERPAPI_API_KEY 要去 SerpApi 申請 API key 填上