mirror of
https://github.com/maillab/cloud-mail.git
synced 2026-04-25 08:16:01 +03:00
[GH-ISSUE #47] 代码同步更新之后出现的问题 #36
Labels
No labels
bug
enhancement
enhancement
enhancement
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cloud-mail-maillab#36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @eshop366 on GitHub (Jul 18, 2025).
Original GitHub issue: https://github.com/maillab/cloud-mail/issues/47
代码同步更新之后,为什么在打开邮箱主页时候出现下面错误:
Cannot read properties of undefined (reading 'get')
浏览器输入https://你的自定义域名/api/init/你绑定的的jwt_secret 会自动初始化数据库,这时候出现的错误是:
{
"code": 500,
"message": "Cannot read properties of undefined (reading 'prepare')"
}
@eshop366 commented on GitHub (Jul 18, 2025):
搞定了,需要重新添加绑定。回到worker设置界面绑定刚刚创建的数据库
d1数据库 变量名为 db
kv数据库 变量名为 kv
@eshop366 commented on GitHub (Jul 19, 2025):
但是依然无法初始化。错误还是如前所述。使用原admin也无法登录。
@Silentely commented on GitHub (Jul 19, 2025):
你是用什么方式部署的? 如果重新添加了变量或者修改了绑定需要重新部署再去初始化数据库
@eshop366 commented on GitHub (Jul 19, 2025):
我用cloudflare worker部署的
@Silentely commented on GitHub (Jul 19, 2025):
cloudflare worker上点进去你的项目重新部署最新版本,另外提供你的绑定页面截图,尽可能提供多些信息排查
@eshop366 commented on GitHub (Jul 19, 2025):
在GitHub上拉取更新后,去CF的worker里面,设置>构建里面,断开连接,又重新建立连接,然后,确认了绑定没有问题之后,再重新部署,部署完成后,初始化时候就提示如下。
{
"code": 500,
"message": "c2.env.db.prepare is not a function"
}
@Silentely commented on GitHub (Jul 19, 2025):
我这无法复现该问题,建议通过action部署或者删除项目按流程重新走一遍
