strapi v4 with postgres error, database does not exist

Viewed 842

I have tried to install the latest strapi version with the following command:

npx create-strapi-app@latest strapi_test

After going through the manual steps and choosing postgres as my db, from within my folder I run the yarn develop command, but then I get the following error:

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

error: database "strapi_test" does not exist

enter image description here

enter image description here

What have I done wrong? I am running node v16.13.0, npm v8.2.0 and on Mac OS Monterey v12.2.1

1 Answers

Had the same problem, turns out you need to create the database yourself with psql. So you need to run:

psql -U postgres

create database strapi_test;

It should work correctly after this.

Related