小编Ali*_*ia 的帖子

Prisma:验证数据源“db”时出错:URL 必须以协议“postgresql://”或“postgres://”开头

我正在尝试在生产中使用 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

11
推荐指数
1
解决办法
2万
查看次数

标签 统计

prisma ×1