我正在尝试在生产中使用 prisma 部署我的 NestJS 应用程序。但是当启动我的服务器时,我遇到了这个错误:
nestjs | PrismaClientInitializationError: error: Error validating datasource `db`: the URL must start with the protocol `postgresql://` or `postgres://`.
nestjs | --> schema.prisma:11
nestjs | |
nestjs | 10 | provider = "postgresql"
nestjs | 11 | url = env("DATABASE_URL")
nestjs | |
nestjs |
nestjs | Validation Error Count: 1
nestjs | at Object.loadEngine (/app/node_modules/@prisma/client/runtime/index.js:35591:19)
nestjs | at async Object.instantiateLibrary (/app/node_modules/@prisma/client/runtime/index.js:35520:5)
nestjs | at async Object.start (/app/node_modules/@prisma/client/runtime/index.js:35670:5)
nestjs | at async Proxy.onModuleInit (/app/dist/prisma.service.js:14:9)
nestjs | …Run Code Online (Sandbox Code Playgroud) prisma ×1