#postgres v3 upgrade script - production deployment error

3 messages · Page 1 of 1 (latest)

wide steppe
#

I'm deploying payload with docker:
https://payloadcms.com/docs/production/deployment#docker

Using the provided script from the v3 upgrade guide to migrate relationships:
payload migrate:create --file @payloadcms/db-postgres/relationships-v2-v3

Results in the following error when running migrations in production at runtime.
https://payloadcms.com/docs/database/migrations#running-migrations-in-production

payload_app  | [22:28:13] ERROR: Error running migration 20250121_215737__payloadcms_db_postgres_relationships_v2_v3 Cannot find module 'drizzle-kit/api'
payload_app  | Require stack:
payload_app  | - /app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@payloadcms/drizzle/dist/postgres/requireDrizzleKit.js.
payload_app  |     err: {
payload_app  |       "type": "Error",
payload_app  |       "message": "Cannot find module 'drizzle-kit/api'\nRequire stack:\n- /app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@payloadcms/drizzle/dist/postgres/requireDrizzleKit.js",
payload_app  |       "stack":
payload_app  |           Error: Cannot find module 'drizzle-kit/api'
payload_app  |           Require stack:
payload_app  |           - /app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@payloadcms/drizzle/dist/postgres/requireDrizzleKit.js
...
payload_app  |     }
gritty leafBOT
wide steppe
#

postgres v3 upgrade script - production deployment error