Unhandled rejection Error: No key or key file specified in config
tanakamapondera opened this issue · comments
I have followed all the steps until creating an env file who all the appropriate environment variables. I have placed them in a ".env" in the root directory. Currently, I have Email, ID and Key defined.
However, when I run the code using the command "analytics" I keep getting the following error message:
Am I placing the ".env" file in the wrong location?
I tried this with both the NPM and Docker installations and both gave me the same error message. Apologies if this seems like such a trivial issue but Couldn't really find any other help online
thanks for the issue. @jmhooper or @ryanhofdotgov -- if you get a sec, could you 👁️ this?
@tanakamapondera The .env file is intended for use with the autoenv tool, which will set project specific environment variables as you change from directory to directory using your shell program (bash, etc.).
Looks like you are using Git for Windows bash emulator? I don't have any experience with it, but if you aren't using autoenv
, I would just try manually sourcing the .env
file to set all the required variables you've configured in .env before running analytics
:
$ source .env
$ analytics
@ryanhofdotgov Apologies for not getting back to you but this solution worked for me. This is still something that I'm looking into but I've currently put this on hold so I will close this issue out