payload
payload copied to clipboard
Trying to create new app but getting type "serial" does not exist on startup
Link to reproduction
https://github.com/brynshanahan/brynshanahan-com
Describe the Bug
When trying to start a new app with Postgres + Docker I am getting unhandledRejection error: type "serial" does not exist
.
I'm starting the database in docker and I am running payload from WSL
To Reproduce
I dont think I've modified anything from the starter template
Payload Version
2.11.2
Adapters and Plugins
db-postgres, bundler-webpack
@brynshanahan It seems like your DATABASE_URI
is not defined ?
The error code 42704
indicates that there is an undefined object definition somewhere.
@fofoy I'm getting this too; I'll trying to connect to a Xata database - the tables have been created in Xata but I get the following stack tract
⨯ Internal error: error: type "serial" does not exist
at /<root>/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DrizzleORMPgClient.query (/<root>/node_modules/drizzle-kit/payload.js:34498:21)
at async apply (/<root>/node_modules/drizzle-kit/payload.js:36648:9)
at async pushDevSchema (../../node_modules/@payloadcms/db-postgres/dist/utilities/pushDevSchema.js:47:5)
at async Object.connect (../../node_modules/@payloadcms/db-postgres/dist/connect.js:84:5)
at async BasePayload.init (../../node_modules/payload/dist/index.js:215:13)
digest: "1337719887"
⨯ Internal error: error: type "serial" does not exist
at /<root>/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DrizzleORMPgClient.query (/<root>/node_modules/drizzle-kit/payload.js:34498:21)
at async apply (/<root>/node_modules/drizzle-kit/payload.js:36648:9)
at async pushDevSchema (../../node_modules/@payloadcms/db-postgres/dist/utilities/pushDevSchema.js:47:5)
at async Object.connect (../../node_modules/@payloadcms/db-postgres/dist/connect.js:84:5)
at async BasePayload.init (../../node_modules/payload/dist/index.js:215:13)
digest: "1337719887"
⨯ Internal error: error: type "serial" does not exist
at /<root>/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DrizzleORMPgClient.query (/<root>/node_modules/drizzle-kit/payload.js:34498:21)
at async apply (/<root>/node_modules/drizzle-kit/payload.js:36648:9)
at async pushDevSchema (../../node_modules/@payloadcms/db-postgres/dist/utilities/pushDevSchema.js:47:5)
at async Object.connect (../../node_modules/@payloadcms/db-postgres/dist/connect.js:84:5)
at async BasePayload.init (../../node_modules/payload/dist/index.js:215:13)
Hey @brynshanahan, @fofoy is probably right, you didn't configure your .env
with DATABASE_URI
and so it's undefined
from your screenshot.
If you can reproduce it on the latest beta we can look again, closing.
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.