question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Support for More .env Files

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:54
  • Comments:6

github_iconTop GitHub Comments

4reactions
mikeedwards83commented, Jan 21, 2022

Bump on this request

3reactions
flybayercommented, Sep 24, 2020

Yes! We also need this for Blitz. Here’s another issue for the same thing: https://github.com/prisma/prisma/issues/3720

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using multiple .env files. - Prisma
One solution is to have multiple .env files which each represent different environments. In practice this means you create a file for each...
Read more >
Customizing Node.js .env files - LogRocket Blog
Learn how to configure a Node.js application via environment variables and customize an .env file with new environment variables.
Read more >
env files support - IntelliJ IDEs Plugin - JetBrains Marketplace
Go to declaration(in . env file) and usages(in code), by Ctrl(Cmd)+click or hot key(Ctrl(Cmd)-B, etc.)
Read more >
We need to talk about the .env | Platform.sh
.env files are increasingly popular as a way to configure an application. This loose standard offers a number of benefits, most of which...
Read more >
Toggle between multiple .env files like .env.development with ...
@goldenmaza You shouldn't need to place this in every JS file. You'll want to add this as early as possible to your application...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found