Fix: Remove --no-engine flag from Prisma generate#38
Open
moonejon wants to merge 1 commit into
Open
Conversation
The --no-engine flag was preventing Prisma from generating the local query engine binaries, which are required when using a standard PostgreSQL connection URL (postgresql://). This flag should only be used when exclusively using Prisma Accelerate (prisma:// URLs). The application already handles both scenarios correctly in src/lib/prisma.ts by conditionally applying the Accelerate extension only when the database URL uses the prisma:// protocol. This fix allows the application to work with both: - Local PostgreSQL (postgresql://) - Prisma Accelerate (prisma:// or prisma+postgres://) Fixes Prisma error: "the URL must start with the protocol prisma:// or prisma+postgres://" Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the Prisma error on main branch: "Error validating datasource
db: the URL must start with the protocolprisma://orprisma+postgres://"Root Cause
The
--no-engineflag in the postinstall script was preventing Prisma from generating local query engine binaries. This flag is only appropriate when exclusively using Prisma Accelerate, but the application supports both local PostgreSQL and Prisma Accelerate connections.Changes
--no-engineflag frompostinstallscript in package.jsonTechnical Details
The application already handles both connection types correctly in
/src/lib/prisma.ts:prisma://orprisma+postgres://URLs: Uses Prisma Accelerate extensionpostgresql://URLs: Uses local query engineThe
--no-engineflag was forcing Accelerate-only mode, breaking local development.Testing
/and/librarypages load successfullyImpact
This is a critical bug fix for local development. The application now works correctly with:
Generated with Claude Code