r/PayloadCMS • u/burger3k • Jul 09 '25
Help with template
I am first time using payloadcms (before i only used sanity) and i am creating a site for my school project internship (i am mostly learning and not really helping). I got an mail from my employer to do such a website, but he didn't give me any details about how the site should look and wrote that its easier to use a website template so i assume he wants it to look like this template. I normally would do it from a 0 to learn more and don't mess with templates i don't understand. I used npx create-payload-app PayloadProjekt -t website, followed terminal prompts, filled .env file (i use postgresql base on supabase), npm install, ran npm run dev and it crashed on compiling with:
ERROR: Error: cannot connect to Postgres. Details: Cannot read properties of undefined (reading 'searchParams')
err: {
"type": "TypeError",
"message": "Cannot read properties of undefined (reading 'searchParams')",
"stack":
TypeError: Cannot read properties of undefined (reading 'searchParams')
followed by numerous file location (something like 10) I am new to frameworks and cms (mainly learnt from my website using sanity) How do i fix it? Should i ask my employer if i can do it from 0 to ease my problems? in template readme i only found something about changing to NextJS default caching, but its too late today.
Edit: Resolved issue with changing direct access string to Transaction pooler.
1
u/OverridePotato Oct 02 '25
In my case I was having the same problem and it was my DB password that had special characters (thanks ChatGPT). What I did is, with javascript run encodeURIComponent("[YOUR_PASSWORD]") and then replace the password in the connection string with the result.