New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for More .env
Files
#3226
Comments
I would like to see this feature too. |
Yes! We also need this for Blitz. Here's another issue for the same thing: #3720 |
This would be very helpful, currently, my solution is proxying |
Bump on this request |
Any update on this? Would really like to use other files depending on my environment. |
Any update about this? |
.env
Files
i have my .env.local file but still prisma is unable to read environment variables
|
Yes, Prisma does not support this out of the box yet. We have documentation on how you can manually achieve that: https://www.prisma.io/docs/guides/development-environment/environment-variables/using-multiple-env-files |
Problem
I primarily use Prisma with Next.js, and since Next 9.4 they've implemented automatic .env detection, based on Create React App's pattern: https://create-react-app.dev/docs/adding-custom-environment-variables/#what-other-env-files-can-be-used
When doing local development, my DATABASE_URL variable is kept in .env.local, which isn't found by default when I run
prisma generate
so Prisma commands tend to require some overhead/repetition in my repo.Suggested solution
Support for the additional .env files used by the popular JS meta frameworks.
Alternatives
A set of local development-specific Prisma commands using dotenv-cli
The text was updated successfully, but these errors were encountered: