Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
12 replies
uiuxphil

Error validating datasource `db`: the URL must start with the protocol `file:`

error when I run prisma db pull:
Error: Prisma schema validation - (get-config wasm)
Error code: P1012
error: Error validating datasource `db`: the URL must start with the protocol `file:`.
  -->  schema.prisma:10
   | 
 9 |     provider = "sqlite"
10 |     url      = env("DATABASE_URL")
   | 

Validation Error Count: 1
[Context: getConfig]


I've seen people on github with the same issue and the solution was to change their .env file from DATABASE_UTL="LIKE_THIS" to DATABASE_URL=LIKE_THIS but I didnt use quotes in my .env in the first place.

I also run prisma generate before running db pull

any ideas whats wrong?
Was this page helpful?