-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
prisma db pull
doesn't read .env
file and errors with Environment variable not found: DATABASE_URL
#11570
Comments
Hi @smoothdvd Thanks for the report! I can confirm this is a regression, we are working on a fix and are planning a patch release later today 🚢 |
prisma db pull
doesn't read .env
file and errors with Environment variable not found: DATABASE_URL
Hey, this issue has been fixed in 3.9.1 which was just published. Thanks for reporting this! |
Phew! Thought I was losing my mind. Confirmed I saw this in 3.9.0, and thankfully not in 3.9.2. |
I have this problem with |
Cna you describe your problem fully @stivencardonam? If there was another full regression, I think we would have already seen more reports of it. So please spend some time to describe the full situation and we can try to figure out what is going on. |
Sure, Bug Description yarn prisma db pull report Environment variable must start with the protocol
DATABASE_URL="mysql://docker:docker@localhost:3306/test" Environment & setup DESCRIPTION I start using prisma with nestjs, I have a folder name
|
Sorry dude, I see my error now, I was overwriting the |
That explains it 😆 Great you figured it out. |
I'm getting the same error and I'm not sure what you mean by overwriting the variable. EDIT: Nevermind, so there was another .env file at the root folder that had priority and, since I assumed that the file closer to the schema file had priority instead, I did not bother looking any further. It would probably be more intuitive if it was the other way round though. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@fwjayy This looks unrelated to this issue and a duplicate of #13647
If that does not work, please create a new issue, so we can help you with that. |
@smoothdvd |
@jedstroke @janpio @Jolg42 Hi this issue comes back again in 5.9.1. With or without the quote from my Here is the link for the details: #23000 |
the problem is that $ |
so you cant be specfic about how you did this. why talk in the first place ..when you can't explain to us how you fixed a problem.mtchew! |
can you show the addition, my has no addition of line. copied from vercel |
Bug description
yarn prisma db pull report Environment variable not found: DATABASE_URL.
.env:
DATABASE_URL="postgresql://user:pass@localhost:49154/db?schema=public"
How to reproduce
Expected behavior
read DATABASE_URL from .env correctly
Prisma information
Environment variables loaded from .env
prisma : 3.9.0
@prisma/client : 3.9.0
Current platform : darwin-arm64
Query Engine (Node-API) : libquery-engine bcc2ff906db47790ee902e7bbc76d7ffb1893009 (at node_modules/@prisma/engines/libquery_engine-darwin-arm64.dylib.node)
Migration Engine : migration-engine-cli bcc2ff906db47790ee902e7bbc76d7ffb1893009 (at node_modules/@prisma/engines/migration-engine-darwin-arm64)
Introspection Engine : introspection-core bcc2ff906db47790ee902e7bbc76d7ffb1893009 (at node_modules/@prisma/engines/introspection-engine-darwin-arm64)
Format Binary : prisma-fmt bcc2ff906db47790ee902e7bbc76d7ffb1893009 (at node_modules/@prisma/engines/prisma-fmt-darwin-arm64)
Default Engines Hash : bcc2ff906db47790ee902e7bbc76d7ffb1893009
Studio : 0.457.0
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: