Error on project set up in my local machine

System Information
  • Strapi Version: 4.15.4
  • Operating System: Windows 11
  • Database: PostgreSQL
  • Node Version: 20.9.0
  • NPM Version: 10.1.0
  • Yarn Version:


I was new to Strapi CMS and I want to set up project in my local machine with following feature.
I want project set up with typescript and database PostgreSQL but getting the below error. Please let any help me in project set up.

After hitting “npm run develop” finally getting this error:

Hey @saimurali , Hope this reply finds you well, as I saw problem here is the PostgreSQL not configured well, check the username and server name to PostgreSQL Database, then if not try to run npm run build, before start develop:
and here a quick article to setup PostgreSQL with Strapi

Hi @iietmoon,
I had given following details while project set-up for PostgreSQL. Can you please point out my error.

Here are some steps you can take to troubleshoot and resolve the issue:

  1. Check PostgreSQL Server: Ensure that your PostgreSQL server is running and that the connection details in your application’s configuration are correct. Verify the host, port, username, password, and database name.
  2. Network Issues: Check if there are any network issues that might be causing a problem with the connection. Ensure that the server is accessible from the machine where your application is running.
  3. Package Versions: Check the versions of the pg and pg-protocol packages in your package.json file. Ensure that they are compatible with each other and with the version of Node.js you are using.

jsonCopy code

"dependencies": {
  "pg": "version_number",
  "pg-protocol": "version_number",
  // other dependencies
  1. Node.js Version: Ensure that you are using a compatible version of Node.js. Some packages may have issues with specific Node.js versions, so it’s a good idea to check the compatibility in the package documentation.
  2. Clear Node Modules and Reinstall: Sometimes, issues can arise due to corrupted or mismatched dependencies. Try deleting the node_modules directory and the package-lock.json file, then run npm install to reinstall the dependencies.
rm -rf node_modules
rm package-lock.json
npm install