Describe the Bug
When clicking "deploy" on the template page and select Git Scope, name the repository, select a Vercel team, and click "Create" it immediately starts buildilng and eventually throws the following error:
rror: Error: missing secret key. A secret key is needed to secure Payload. at U.init (.next/server/chunks/ssr/0z_3c97..js:440:9954) at async X (.next/server/chunks/ssr/0z_3c97..js:440:14030) at async q (.next/server/chunks/ssr/[root-of-the-server]_0d17o0._.js:1:20436) { payloadInitError: true }
and
Build error occurred Error: Failed to collect page data for /[slug] at ignore-listed frames { type: 'Error' } Error: Command "npm run build" exited with 1
Link to the code that reproduces this issue
https://github.com/payloadcms/payload/tree/main/templates/with-vercel-website
Reproduction Steps
Which area(s) are affected?
area: templates
Environment Info
npm warn Unknown env config "npm-globalconfig". This will stop working in the next major version of npm.
npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm.
npm warn Unknown env config "_jsr-registry". This will stop working in the next major version of npm.
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: 25.2.1
npm: 11.6.2
Yarn: N/A
pnpm: 10.33.0
Relevant Packages:
payload: 3.82.1
next: 16.2.3
@payloadcms/db-vercel-postgres: 3.82.1
@payloadcms/drizzle: 3.82.1
@payloadcms/graphql: 3.82.1
@payloadcms/live-preview: 3.82.1
@payloadcms/live-preview-react: 3.82.1
@payloadcms/next/utilities: 3.82.1
@payloadcms/plugin-cloud-storage: 3.82.1
@payloadcms/plugin-form-builder: 3.82.1
@payloadcms/plugin-nested-docs: 3.82.1
@payloadcms/plugin-redirects: 3.82.1
@payloadcms/plugin-search: 3.82.1
@payloadcms/plugin-seo: 3.82.1
@payloadcms/richtext-lexical: 3.82.1
@payloadcms/storage-vercel-blob: 3.82.1
@payloadcms/translations: 3.82.1
@payloadcms/ui/shared: 3.82.1
react: 19.2.4
react-dom: 19.2.4
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.2.0: Tue Nov 18 21:09:49 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T8142
Available memory (MB): 16384
Available CPU cores: 10
Describe the Bug
When clicking "deploy" on the template page and select Git Scope, name the repository, select a Vercel team, and click "Create" it immediately starts buildilng and eventually throws the following error:
rror: Error: missing secret key. A secret key is needed to secure Payload. at U.init (.next/server/chunks/ssr/0z_3c97..js:440:9954) at async X (.next/server/chunks/ssr/0z_3c97..js:440:14030) at async q (.next/server/chunks/ssr/[root-of-the-server]_0d17o0._.js:1:20436) { payloadInitError: true }and
Build error occurred Error: Failed to collect page data for /[slug] at ignore-listed frames { type: 'Error' } Error: Command "npm run build" exited with 1Link to the code that reproduces this issue
https://github.com/payloadcms/payload/tree/main/templates/with-vercel-website
Reproduction Steps
Which area(s) are affected?
area: templates
Environment Info