So, as the title suggests, I’m trying out Strapi 5 RC and I just finished the installation. Here’s my options:
? Please log in or sign up. Skip
? Do you want to use the default database (sqlite) ? No
? Choose your default database client postgres
? Database name: strapi
? Host: 127.0.0.1
? Port: 5432
? Username: username
? Password: ********
? Enable SSL connection: No
? Start with an example structure & data? No
? Start with Typescript? Yes
? Install dependencies with npm? Yes
? Initialize a git repository? No
SO, what’s up is, once i cd b*
npm run develop
I get the following error:
⠋ Loading Strapi⠋ Building build context
[INFO] Including the following ENV variables as part of the JS bundle:
- ADMIN_PATH
- STRAPI_ADMIN_BACKEND_URL
- STRAPI_TELEMETRY_DISABLED
✔ Building build context (130ms)
✔ Creating admin (303ms)
⠏ Loading Strapi[ERROR] There seems to be an unexpected error, try again with --debug for more information
┌───────────────────────────────────────────────────────────────────────────┐
│ │
│ Error: connect ECONNREFUSED 127.0.0.1:5432 │
│ at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1605:16) │
│ │
└───────────────────────────────────────────────────────────────────────────┘
A little Googling later and I found out (according to this SO post: postgresql - Strapi instalation has error: connect ECONNREFUSED 127.0.0.1:5432 - Stack Overflow) that I need to already have a PG database setup.
This led me to the following (obvious, in retrospect) realisation: in setup, I wasnt entering the credentials I wished to use for Strapi, I was entering my (supposedly existing) pg db credentials. Yes I’m dumb at times
This topic has been created from a Discord post (1283027568445882370) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord