-
Notifications
You must be signed in to change notification settings - Fork 61
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
--env-file flag collision for node 20 #131
Comments
i think you're right. it shouldn't fail. it should just warn. will patch up. |
what node version are you using here? maybe there is a flag collision i need to look into. |
@motdotla v20.11.1 |
yes, that's the issue. node@18-latest works. node@20.11.1 doesn't. |
we used --env-file because we like the principle of least surprise (keep in mind many devs use the binary rather than the npm install (in which case this is not an issue)) that said, to unblock you, use -f as the flag instead of --env-file. that should work. i'll also reconsider the flag name. |
If I didn't get you wrong: binary doesn't work too. But I'm totally with you using this flag name.
|
binary should work, but not the the binary (or brew) installs can be done via:
|
there is some chatter with the Node team that they will replace the error with a warning - which I hope and expect to see. So until then, I'm adding this issue to a new FAQ: |
Hey! I'm trying to implement dotenvx to my TypeScript project.
This is my desired command:
dotenvx run --env-file=.env --env-file=.env.test --env-file=.env.test.local --overload ...
In case
.env.test.local
or any other --env-file option is not present, dotenvx fails. I think native fs error bubbles up. I'd suggest and need for my case an option, that it doesn't fail if a file is not present. I think it's not mandatory to let it fail. What do you think?thanks!
The text was updated successfully, but these errors were encountered: