Skip to content

Vercel one-click deployment fails: Command "pnpm run ci" exited with 1 #14894

@adamiBs

Description

@adamiBs

Describe the Bug

08:42:07.036 Running build in Portland, USA (West) – pdx1
08:42:07.037 Build machine configuration: 4 cores, 8 GB
08:42:07.137 Previous build caches not available.
08:42:07.722 Cloning completed: 585.000ms
08:42:08.037 Warning: Detected "engines": { "node": "^18.20.2 || >=20.9.0" } in your `package.json` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version
08:42:08.037 Running "vercel build"
08:42:08.528 Vercel CLI 49.1.2
08:42:08.786 Warning: Detected "engines": { "node": "^18.20.2 || >=20.9.0" } in your `package.json` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version
08:42:08.795 Installing dependencies...
08:42:09.032 npm warn Unknown project config "enable-pre-post-scripts". This will stop working in the next major version of npm.
08:42:39.903 npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
08:42:40.605 npm warn deprecated @esbuild-kit/[email protected]: Merged into tsx: https://tsx.is
08:42:40.645 npm warn deprecated @esbuild-kit/[email protected]: Merged into tsx: https://tsx.is
08:42:40.645 npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
08:42:53.591 
08:42:53.591 added 889 packages in 45s
08:42:53.591 
08:42:53.591 251 packages are looking for funding
08:42:53.591   run `npm fund` for details
08:42:53.935 Detected Next.js version: 15.4.8
08:42:53.936 Running "pnpm run ci"
08:42:54.813 
08:42:54.813 > [email protected] ci /vercel/path0
08:42:54.813 > payload migrate && pnpm build
08:42:54.813 
08:42:57.719 [06:42:57] �[33mWARN�[39m: �[36mNo email adapter provided. Email will be written to console. More info at https://payloadcms.com/docs/email/overview.�[39m
08:42:57.721 [06:42:57] �[32mINFO�[39m: �[36mReading migration files from /vercel/path0/src/migrations�[39m
08:42:57.769 /vercel/path0/node_modules/src/pg-core/session.ts:73
08:42:57.770 				throw new DrizzleQueryError(queryString, params, e as Error);
08:42:57.770 				      ^
08:42:57.770 
08:42:57.770 DrizzleQueryError: Failed query: SELECT to_regclass('"payload_migrations"') AS exists;
08:42:57.770 params: 
08:42:57.771     at NodePgPreparedQuery.queryWithCache (/vercel/path0/node_modules/src/pg-core/session.ts:73:11)
08:42:57.771     at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
08:42:57.771     at async migrationTableExists (/vercel/path0/node_modules/@payloadcms/drizzle/src/utilities/migrationTableExists.ts:27:18)
08:42:57.771     at async Object.migrate (/vercel/path0/node_modules/@payloadcms/drizzle/src/migrate.ts:37:29)
08:42:57.771     at async migrate (/vercel/path0/node_modules/payload/src/bin/migrate.ts:87:7)
08:42:57.771     at async runBinScript (/vercel/path0/node_modules/payload/dist/bin/index.js:112:9)
08:42:57.771     at async bin (/vercel/path0/node_modules/payload/dist/bin/index.js:45:29)
08:42:57.771     at async start (file:///vercel/path0/node_modules/payload/bin.js:30:7) {
08:42:57.771   query: `SELECT to_regclass('"payload_migrations"') AS exists;`,
08:42:57.771   params: [],
08:42:57.771   cause: ErrorEvent {
08:42:57.771     Symbol(kTarget): WebSocket {
08:42:57.771       _events: [Object: null prototype] {
08:42:57.771         error: [Function: onError] {
08:42:57.771           Symbol(kIsForOnEventAttribute): false,
08:42:57.771           Symbol(kListener): [Function (anonymous)]
08:42:57.771         },
08:42:57.771         message: [Function: onMessage] {
08:42:57.771           Symbol(kIsForOnEventAttribute): false,
08:42:57.771           Symbol(kListener): [Function (anonymous)]
08:42:57.771         },
08:42:57.772         close: [Function: onClose] {
08:42:57.772           Symbol(kIsForOnEventAttribute): false,
08:42:57.772           Symbol(kListener): [Function (anonymous)]
08:42:57.772         },
08:42:57.772         open: [Function: onOpen] {
08:42:57.772           Symbol(kIsForOnEventAttribute): false,
08:42:57.772           Symbol(kListener): [Function: handleWebSocketOpen]
08:42:57.772         }
08:42:57.774       },
08:42:57.774       _eventsCount: 4,
08:42:57.774       _maxListeners: undefined,
08:42:57.774       _binaryType: 'arraybuffer',
08:42:57.774       _closeCode: 1006,
08:42:57.774       _closeFrameReceived: false,
08:42:57.774       _closeFrameSent: false,
08:42:57.774       _closeMessage: Buffer(0) [Uint8Array] [],
08:42:57.774       _closeTimer: null,
08:42:57.774       _errorEmitted: true,
08:42:57.775       _extensions: {},
08:42:57.775       _paused: false,
08:42:57.775       _protocol: '',
08:42:57.775       _readyState: 3,
08:42:57.775       _receiver: null,
08:42:57.775       _sender: null,
08:42:57.775       _socket: null,
08:42:57.775       _bufferedAmount: 0,
08:42:57.775       _isServer: false,
08:42:57.775       _redirects: 0,
08:42:57.775       _autoPong: true,
08:42:57.775       _url: 'wss://localhost/v2',
08:42:57.775       _req: null,
08:42:57.775       Symbol(shapeMode): false,
08:42:57.775       Symbol(kCapture): false
08:42:57.775     },
08:42:57.775     Symbol(kType): 'error',
08:42:57.775     Symbol(kError): Error: connect ECONNREFUSED 127.0.0.1:443
08:42:57.775         at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1637:16) {
08:42:57.775       errno: -111,
08:42:57.775       code: 'ECONNREFUSED',
08:42:57.775       syscall: 'connect',
08:42:57.775       address: '127.0.0.1',
08:42:57.775       port: 443
08:42:57.775     },
08:42:57.775     Symbol(kMessage): 'connect ECONNREFUSED 127.0.0.1:443'
08:42:57.775   }
08:42:57.775 }
08:42:57.775 
08:42:57.775 Node.js v24.11.1
08:42:57.795  ELIFECYCLE  Command failed with exit code 1.
08:42:57.807 Error: Command "pnpm run ci" exited with 1

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/tree/main/templates/with-vercel-website

Reproduction Steps

I just performed the online setup through Vercel: https://vercel.com/templates/next.js/payload-website-starter

Which area(s) are affected?

db: postgres, db: vercel-postgres

Environment Info

> [email protected] payload XXXXXX
> cross-env NODE_OPTIONS=--no-deprecation payload info

npm warn Unknown env config "enable-pre-post-scripts". This will stop working in the next major version of npm.
npm warn Unknown project config "enable-pre-post-scripts". This will stop working in the next major version of npm.

Binaries:
  Node: 24.11.0
  npm: 11.6.1
  Yarn: N/A
  pnpm: 9.15.9
Relevant Packages:
  payload: 3.63.0
  next: 15.4.8
  @payloadcms/db-vercel-postgres: 3.63.0
  @payloadcms/drizzle: 3.63.0
  @payloadcms/graphql: 3.63.0
  @payloadcms/live-preview: 3.63.0
  @payloadcms/live-preview-react: 3.63.0
  @payloadcms/next/utilities: 3.63.0
  @payloadcms/plugin-cloud-storage: 3.63.0
  @payloadcms/plugin-form-builder: 3.63.0
  @payloadcms/plugin-nested-docs: 3.63.0
  @payloadcms/plugin-redirects: 3.63.0
  @payloadcms/plugin-search: 3.63.0
  @payloadcms/plugin-seo: 3.63.0
  @payloadcms/richtext-lexical: 3.63.0
  @payloadcms/storage-vercel-blob: 3.63.0
  @payloadcms/translations: 3.63.0
  @payloadcms/ui/shared: 3.63.0
  react: 19.2.1
  react-dom: 19.2.1
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions