prisma-viewer icon indicating copy to clipboard operation
prisma-viewer copied to clipboard

error: Environment variable not found: DATABASE_URL.

Open janpio opened this issue 5 years ago • 1 comments

Right now it errors if you are missing an ENV var from e.g. env("DATABASE_URL"):

C:\Users\Jan\Documents\prisma-chinook\cli -> origin-demo (cli -> origin) (prisma-chinook-cli -> [email protected])
λ pv
Error: Error: Schema parsing
error: Environment variable not found: DATABASE_URL.
  -->  schema.prisma:7
   |
 6 |   provider = "mysql"
 7 |   url      = env("DATABASE_URL")
   |

Validation Error Count: 1
    at Object.<anonymous> (C:\ProgramData\nvm\v12.6.0\node_modules\prisma-viewer\node_modules\@prisma\sdk\dist\engineCommands.js:128:23)
    at Generator.throw (<anonymous>)
    at rejected (C:\ProgramData\nvm\v12.6.0\node_modules\prisma-viewer\node_modules\@prisma\sdk\dist\engineCommands.js:6:65)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)

Is this useful/helpful? I see you are using @prisma/sdk here, maybe we should have a way to skip this validation step by choice?

janpio avatar Feb 21 '20 12:02 janpio

I see you are using @prisma/sdk here, maybe we should have a way to skip this validation step by choice?

Yes, that would be helpful :)

williamluke4 avatar Feb 22 '20 06:02 williamluke4