gpt4 book ai didi

mysql - 无服务器在本地工作,但在部署时不工作

转载 作者:行者123 更新时间:2023-12-04 09:59:17 24 4
gpt4 key购买 nike

我已经编写了一个简单的服务服务器并将其转换为一个 lambda 函数来查询 amazon RDS 中的 MySQL 数据库。我可以使用 serverless offline start 让它在本地工作,但是当我部署它时 (serverless deploy) 在尝试访问我的简单测试端点时,我的仪表板出现以下错误.

10:24:00 am
START RequestId: 9577f510-712c-4204-b9ac-05d75defcb42 Version: $LATEST
10:24:00 am
2019-10-28T14:24:00.167Z 9577f510-712c-4204-b9ac-05d75defcb42 INFO
10:24:00 am
2019-10-28T14:24:00.169Z 9577f510-712c-4204-b9ac-05d75defcb42 ERROR ReferenceError: exe is not defined
at Object.<anonymous> (/var/task/s_apigw.js:14:66)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at _tryRequire (/var/runtime/UserFunction.js:75:12)
at _loadUserApp (/var/runtime/UserFunction.js:95:12)
10:24:00 am
2019-10-28T14:24:00.185Z 9577f510-712c-4204-b9ac-05d75defcb42 ERROR Invoke Error {
"errorType": "ReferenceError",
"errorMessage": "exe is not defined",
"stack": [
"ReferenceError: exe is not defined",
" at Object.<anonymous> (/var/task/s_apigw.js:14:66)",
" at Module._compile (internal/modules/cjs/loader.js:778:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)",
" at Module.load (internal/modules/cjs/loader.js:653:32)",
" at tryModuleLoad (internal/modules/cjs/loader.js:593:12)",
" at Function.Module._load (internal/modules/cjs/loader.js:585:3)",
" at Module.require (internal/modules/cjs/loader.js:692:17)",
" at require (internal/modules/cjs/helpers.js:25:18)",
" at _tryRequire (/var/runtime/UserFunction.js:75:12)",
" at _loadUserApp (/var/runtime/UserFunction.js:95:12)"
]
}
10:24:00 am
END RequestId: 9577f510-712c-4204-b9ac-05d75defcb42
10:24:00 am
REPORT RequestId: 9577f510-712c-4204-b9ac-05d75defcb42 Duration: 30.73 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 83 MB Init Duration: 210.80 ms

最佳答案

原来这是我的解析器。我需要使用 LTS 13.*。

关于mysql - 无服务器在本地工作,但在部署时不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58593207/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com