Build Fails Due to Missing Database Connection #11148
musti17
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
🐛 Issue: Build Fails Due to Missing Database Connection
Description
The website template of Payload fails to build unless a database connection is provided or a container is running. This contradicts the Payload migration docs, which state that the build process should not require a database connection. Quoted as
"Running them during build time may be impossible due to not having access to your database connection while building or similar reasoning."
Expected Behavior
The build should complete successfully without requiring an active database connection.
Current Behavior
npm run build
(or equivalent build command) fails unless a database is connected.Steps to Reproduce
npm run build
.Additional Context
This behavior is unexpected based on the documentation. If this is intentional, it should be explicitly mentioned in the docs. Otherwise, a fix is needed to allow builds to run without a database connection.
Beta Was this translation helpful? Give feedback.
All reactions