ourongxing/newsnow

部署连接数据库失败

Closed this issue · 1 comments

在cloudflare建了一个db, 把name(没改)和id填到了wrangler.toml文件中, 部署到数据库那一步提示错误,
日志:

...
03:48:18.699 | ✨ Upload complete!
-- | --
03:48:20.594 | Success: Assets published!
03:48:22.873 | Error: Failed to publish your Function. Got error: binding NEWSNOW_DB of type d1 must have a database that already exists. Use wrangler or the UI to create the database.

是我还需要在cloudflare里做什么设置吗?

数次同样的失败后我强行继续下面的步骤, 居然数据库里也有了记录, 网页也能访问, 后台提示部署成功.