Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This Serverless Function has crashed. #295

Open
Ellie1568 opened this issue Sep 28, 2023 · 10 comments
Open

This Serverless Function has crashed. #295

Ellie1568 opened this issue Sep 28, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@Ellie1568
Copy link

您好,之前有測試成功,回來就一直錯誤了!自己研究了好久,還是無解,重新安裝好幾次都一樣
目前出現以下
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帳號,也是一樣,請問我應該怎麼辦呢?

@Ellie1568 Ellie1568 added the question Further information is requested label Sep 28, 2023
@EllieMamiya
Copy link

補充

[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
Copy link
Owner

@Ellie1568

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

@Ellie1568
Copy link
Author

Ellie1568 commented Sep 30, 2023 via email

@memochou1993
Copy link
Owner

@Ellie1568

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

@yichungcheng
Copy link

yichungcheng commented Oct 1, 2023

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 memochou1993 changed the title 出現This Serverless Function has crashed. This Serverless Function has crashed. Oct 1, 2023
@memochou1993
Copy link
Owner

@Ellie1568 @yichungcheng

嗨。

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

VERCEL_CLI_VERSION = vercel@32.2.5
image

Related issue: vercel/vercel#10564

@yichungcheng
Copy link

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

@memochou1993 memochou1993 added the bug Something isn't working label Oct 2, 2023
@Ellie1568
Copy link
Author

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

@yujieChen0924
Copy link

您好,除了"缺少環境變數: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 memochou1993 removed the question Further information is requested label Feb 13, 2024
@memochou1993
Copy link
Owner

@yujieChen0924

SERPAPI_API_KEY 要去 SerpApi 申請 API key 填上

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants