prisma / prisma

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
https://www.prisma.io
Apache License 2.0
39.67k stars 1.55k forks source link

`prisma generate` loads env vars twice #9427

Open janpio opened 3 years ago

janpio commented 3 years ago
C:\Users\Jan\Documents\prisma-dataproxy-test>npx prisma generate
  prisma:loadEnv project root found at C:\Users\Jan\Documents\prisma-dataproxy-test\package.json +0ms
  prisma:tryLoadEnv Environment variables loaded from C:\Users\Jan\Documents\prisma-dataproxy-test\.env +0ms
[dotenv][DEBUG] did not match key and value when parsing line 1: #DATABASE_URL=postgresql://estell:BbSoWIUMS1@pg-db-provision.cm0mkpwj8arx.eu-central-1.rds.amazonaws.com:5432/blush_snail
Environment variables loaded from .env
  prisma:engines binaries to download libquery-engine, migration-engine, introspection-engine, prisma-fmt +0ms
Prisma schema loaded from prisma\schema.prisma
  prisma:getConfig Using CLI Query Engine (Node-API Library) at: C:\Users\Jan\Documents\prisma-dataproxy-test\node_modules\prisma\query_engine-windows.dll.node +0ms
  prisma:getDMMF Using CLI Query Engine (Node-API) at: C:\Users\Jan\Documents\prisma-dataproxy-test\node_modules\prisma\query_engine-windows.dll.node +0ms
  prisma:generator prismaCLIDir C:\Users\Jan\Documents\prisma-dataproxy-test\node_modules\prisma +0ms
  prisma:generator prismaClientDir C:\Users\Jan\Documents\prisma-dataproxy-test\node_modules\@prisma\client +1ms
  prisma:generator baseDir C:\Users\Jan\Documents\prisma-dataproxy-test\prisma +2ms
  prisma:GeneratorProcess 2021-09-24T17:34:42.892Z prisma:client:generator requiredEngine: libqueryEngine +0ms
  prisma:getGenerators neededVersions {
  "eb8eb4c97238c32c9e71756e76d59ed5e502185a": {
    "engines": [
      "libqueryEngine"
    ],
    "binaryTargets": []
  }
} +0ms
  prisma:getGenerators {
  prisma:getGenerators   generatorBinaryPaths: {
  prisma:getGenerators     libqueryEngine: {
  prisma:getGenerators       windows: 'C:\\Users\\Jan\\Documents\\prisma-dataproxy-test\\node_modules\\prisma\\query_engine-windows.dll.node'
  prisma:getGenerators     }
  prisma:getGenerators   }
  prisma:getGenerators } +4ms
  prisma:GeneratorProcess 2021-09-24T17:34:43.018Z prisma:loadEnv skipping package.json at C:\Users\Jan\Documents\prisma-dataproxy-test\node_modules\.prisma\package.json +126ms
  prisma:GeneratorProcess 2021-09-24T17:34:43.019Z prisma:loadEnv skipping package.json at C:\Users\Jan\Documents\prisma-dataproxy-test\node_modules\package.json +1ms
  prisma:GeneratorProcess 2021-09-24T17:34:43.020Z prisma:loadEnv project root found at C:\Users\Jan\Documents\prisma-dataproxy-test\package.json +2ms
  prisma:tryLoadEnv Environment variables loaded from C:\Users\Jan\Documents\prisma-dataproxy-test\.env +0ms
[dotenv][DEBUG] did not match key and value when parsing line 1: #DATABASE_URL=postgresql://estell:BbSoWIUMS1@pg-db-provision.cm0mkpwj8arx.eu-central-1.rds.amazonaws.com:5432/blush_snail
[dotenv][DEBUG] "DATABASE_URL" is already defined in `process.env` and will not be overwritten

✔ Generated Prisma Client (3.1.0-integration-data-proxy-engine.1) to .\node_modules\@prisma\client in 245ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client

import { PrismaClient } from '@prisma/client' const prisma = new PrismaClient()

  prisma:getConfig Using CLI Query Engine (Node-API Library) at: C:\Users\Jan\Documents\prisma-dataproxy-test\node_modules\@prisma\engines\query_engine-windows.dll.node +2s

Note:

  prisma:loadEnv project root found at C:\Users\Jan\Documents\prisma-dataproxy-test\package.json +0ms
  prisma:tryLoadEnv Environment variables loaded from C:\Users\Jan\Documents\prisma-dataproxy-test\.env +0ms
[dotenv][DEBUG] did not match key and value when parsing line 1: #DATABASE_URL=postgresql://es...S1@pg-db-provision.cm0mkpwj8arx.eu-central-1.rds.amazonaws.com:5432/blush_snail
Environment variables loaded from .env
...
  prisma:tryLoadEnv Environment variables loaded from C:\Users\Jan\Documents\prisma-dataproxy-test\.env +0ms
[dotenv][DEBUG] did not match key and value when parsing line 1: #DATABASE_URL=postgresql://estell:BbSoWIUMS1@pg-db-provision.cm0mkpwj8arx.eu-central-1.rds.amazonaws.com:5432/blush_snail
[dotenv][DEBUG] "DATABASE_URL" is already defined in `process.env` and will not be overwritten
pantharshit00 commented 3 years ago

I can reproduce the logs. Someone will need to have a deeper look here.