带 postgres 错误的 strapi v4,数据库不存在

strapi v4 with postgres error, database does not exist

我尝试使用以下命令安装最新的 strapi 版本:

npx create-strapi-app@latest strapi_test

完成手动步骤并选择 postgres 作为我的数据库后,我从我的文件夹中 运行 yarn develop 命令,但随后出现以下错误:

debug: ⛔️ Server wasn't able to start properly.

error: database "strapi_test" does not exist

我做错了什么? 我正在 运行ning node v16.13.0、npm v8.2.0 和 Mac OS Monterey v12.2.1

有同样的问题,原来你需要用psql自己创建数据库。所以你需要 运行:

psql -U postgres

create database strapi_test;

此后它应该可以正常工作。