-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Root .env variables aren't available to prisma in monorepo #12535
Copy link
Copy link
Open
Labels
bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.Bug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.A reported bug.topic: .envtopic: monorepotopic: turborepohttps://turborepo.org/https://turborepo.org/
Description
Bug description
We have a monorepo using turbo repo with the following structure:
The prisma package is being used in multiple applications, currently we're trying to use a single .env to avoid confusion. Moving the DATABASE_URL url from packages/prisma/.env to the root .env errors when trying to run any yarn prisma script.
We also tried to use a solution like cmd-env:
But no luck so far.
How to reproduce
- Have a monorepo with and
.envfile at the root - Have something like
packages/prismain a monorepo package - Set
DATABASE_URLin the root.envfile. - Try to run any
yarn prismacommand.
Expected behavior
Being able to use the monorepo DATABASE_URL without having to set it up in packages/prisma/.env.
Prisma information
https://github.com/calcom/cal.com/blob/main/packages/prisma/schema.prisma
Environment & setup
- OS: Mac OS 12
- Database: PostgreSQL
- Node.js version: v14.17.6
Prisma Version
prisma : 3.10.0
@prisma/client : 3.10.0
Current platform : darwin
Query Engine (Node-API) : libquery-engine 73e60b76d394f8d37d8ebd1f8918c79029f0db86 (at node_modules/@prisma/engines/libquery_engine-darwin.dylib.node)
Migration Engine : migration-engine-cli 73e60b76d394f8d37d8ebd1f8918c79029f0db86 (at node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine : introspection-core 73e60b76d394f8d37d8ebd1f8918c79029f0db86 (at node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary : prisma-fmt 73e60b76d394f8d37d8ebd1f8918c79029f0db86 (at node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash : 73e60b76d394f8d37d8ebd1f8918c79029f0db86
Studio : 0.458.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.Bug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.A reported bug.topic: .envtopic: monorepotopic: turborepohttps://turborepo.org/https://turborepo.org/


