-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: cannot connect to Postgres. Details: Cannot read properties of undefined (reading 'setTypeParser') #7974
Comments
i'm also getting this error. i chose vercel postgres with |
i'm getting the same error, looks like something wrong with db-vercel-postgres adapter. |
try manually adding
|
This removes the error but now I get stuck on
|
I'm not sure why this would help considering Looking into the actual issue, though |
Looks like there was an old drizzle issue here: drizzle-team/drizzle-orm#505 However, it looks like that should have been merged in and fixed. |
I have the same error testing Payload 3.0 with vercel postgres 😔 |
I have reached out to Drizzle regarding this. |
Same error here. Does any one know if there is a workaround while the issue is being looked at? |
Using this "deploy to vercel" button worked for me 👌😎 |
That template seems to use the |
The postgres adapter still works on vercel, it's just not as lightweight because it has pg as a dependency. |
should fix it for the time being. i can't remember which library when i was debugging, but maybe it was drizzle that's looking for an import from pg but is undefined until i explicitly added the dependency. |
@calebfoster Correct, we've reached out to them in regards to this. |
Did you fix this in any way? Got the setTypeParser error first, after installing "pg" im stuck at your error also |
also having the same error, can't run the app at all because of it |
Faced the same error, subscribing to this thread |
Same error here as well. |
I also have the same issue |
What's the purpose of this adapter anyway, hasn't been working once since creation, just use |
Any movement with this? |
This issue has been marked as stale due to lack of activity. To keep this issue open, please indicate that it is still relevant in a comment below. |
This issue was automatically closed due to lack of activity. |
Hello, I've stumbled in here upon trying Payload CMS for the first time. First I ran: npx create-payload-app@latest I ensured my .ENV had a valid DATABASE_URI, but the Postgres error persists.
So I ran: yarn add pg Then I got an error about sharp, and it tells me to run this command: npm install --platform=win32 --arch=x64 sharp Finally, payload CMS seems to boot correctly, the database is created, and I'm off to the races playing around. Thanks for this pretty cool CMS. |
Link to reproduction
No response
Environment Info
Describe the Bug
Get this error upon starting a blank project with vercel postgres:
[23:37:03] ERROR: Error: cannot connect to Postgres. Details: Cannot read properties of undefined (reading 'setTypeParser')
Reproduction Steps
-> pnpm create-payload-app@beta
-> Choose blank project
-> Enter vercel postgres database uri
-> pnpm dev
Also I think the .env doesn't automatically update with the url given to the CLI tool - though the issue persists even when I manually update the env variable.
Adapters and Plugins
db-vercel-postgres
The text was updated successfully, but these errors were encountered: