#Unable to find `pg_config` on the system $PATH

1 messages · Page 1 of 1 (latest)

echo junco
#

Hi there! 👋 I ran the command make provision-postgres-macos-intel but I am seeing the following error related to pg_config not being found on the system $PATH. This issue later causes the yarn database:init command to fail. When I do which pg_config I am able to see the correct PATH so I'm not sure what's up here. Also I am on latest main. Any help would be super appreciated!

Thanks!

echo junco
#

I also see this line a little earlier

shrewd lodge
#

I'm not an expert, but I'll attempt to debug the issue. To check if pg_config is accessible to the script, we can include the following line in our script located at twenty/infra/dev/scripts/setup-postgres-macos-intel.sh:

echo "Debug: pg_config is in the \$PATH: $(which pg_config)"
shrewd lodge
echo junco
#

I do also have docker running, here are the env vars being used there:

#

Maybe it's related to postgres versions since the container is using version14?

shrewd lodge
#

Ohh yes, makes sense

rich palm
#

We really need to prebuild this, it's impacting a lot the developer experience. I'm going to create a ticket about that

golden dock
#

Is this issue fixed?

rich palm
#

We will start providing pre-built pg_graphql images. I'm interested into working with you to test the setup 🙂

#

What mac do you have? M1/M2/M3, intel ?

sour venture
#

Hey @rich palm I'm facing a similar issue with pg_graphql extension

#

Using Intel mac, thanks!

#

Tried switching from Postgresql 15 to 14 but no luck

rich palm
#

?

#

@sour venture I'm going to push some files on a branch that you should be able to move into your postgres folder

#

In the mean time, make sure you have postgres 15.5

#

(the intel ones for pg_graphql 1.3.0)

#

you will need to place them into /usr/local/opt/postgresql@15/lib/postgresql and /usr/local/opt/postgresql@15/share/postgresql@15/extension

#

once done, you should be able to do "CREATE EXTENSION pg_graphql" in your postgresql console

#

if this is working, we will script that!

sour venture
#

I did this and it was not working for me

#

Until I realised my runtime was looking in a different folder altogether

#

It was looking in /Library/Postgresql/15 ..

#

I guess it created that directory when I had a pgAdmin GUI installed

rich palm
#

@sour venture Is the issue fixed?

sour venture
#

Yes that fixed it! 🙂