-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Failed to find .rc file at default paths: [./.env-cmdrc,./.env-cmdrc.js,./.env-cmdrc.json] #127
Comments
Thanks for bringing this up. I need to do some refactoring around how error handling/propagation works anyways. I will fix this while I am at it 😄 |
thanks, in my case I had a trailing comma |
I just had the same problem. Just a thought: disallow .env-cmdrc w/o a type suffix? At least in that case lint will catch the error for many. |
sometime it's work, sometime .... Can i change to older version to fix this issues |
I had the same issue and using a single environment is throwing
As a workaround for now, I have to use for example:
this project helps me a lot and I really like it. hoping this can be fixed. |
any news about this? same issue My .env-cmdrc.json file looks like
|
Hi, |
This confused me because I thought env-cmd couldn't find my configuration file, since that was the only error I saw. It turned out it was an error in my configuration code causing the issue. I'd definitely suggest outputting any errors to the console. |
The same error happens when trying to use |
Here is the error. Need to use a dynamic import in
|
It seems much more easy and bulletproof to fix the problem with '.cjs' extension, which is done for ENV JS files: 8d94925 I'd like to make similar '.cjs' fix for RC JS file too (now there is no way to make it work in 'type: module' project) |
its most likely a syntax error for me my env-cmdrc had a comma in the last key value pair in the development section. |
Any update on this one? No updates from @toddbluhm since 2020 :( Another situation where this is a problem is when you are returning a promise from |
I spent an entire workday working through this issue. My build passed on local Docker but failed with the above error when running in ECR with Argo. Changing this from a .js to .json file fixed this for me. Not sure whether to scream or laugh!! |
This has been reported already in #118 but the OP closed it.
The reason for this error message in both my case in issue 118's OP was that the .env-cmd was not valid JSON and could not be parsed correctly which would have been much more helpful error message than this confusing information about env-cmd not being able to find the .rc file.
The issue lies here in get-env-var.js inside the catch that is muting all exceptions except EnvironmentError, I added a comment and console.log there to debug locally:
Maybe you could just rethrow the error below the "if" statement to make sure errors are not muted.
The text was updated successfully, but these errors were encountered: