0

I'm new to learning javascript and I'm running into an issue with trying to deploy this web app using heroku: https://github.com/girliemac/web-speech-ai. The error message says:

Error: 'clientAccessToken' cannot be empty.

I am getting this error message after I have already written the api key in the .env and app.json file. Can someone help me resolve this?

Edit: I already have the dotenv module installed.

  • https://github.com/dialogflow/dialogflow-nodejs-client/issues/104 – Martin Zeitler Aug 21 '21 at 01:24
  • @MartinZeitler this is an old thread without a solution that resolves the issue. bimalkumarh only comments out the code which throws the error, but doesn't solve the issue of clientAccessToken registering as empty. – user12100564 Aug 21 '21 at 02:36
  • Why not just provide the token, instead of complaining that there is nothing to copy & paste? – Martin Zeitler Aug 21 '21 at 02:48
  • @MartinZeitler If I am understanding you correctly, you want me to provide you the api key? If so, I can not do that for security reasons. – user12100564 Aug 21 '21 at 08:30
  • Otherwise, I have already provided the api key in the .env and app.json files, as mentioned in the original post. – user12100564 Aug 21 '21 at 08:40

1 Answers1

0

Following the documention:https://devcenter.heroku.com/articles/config-vars, I was able to resolve the issue by setting the config vars. I thought just writing it in the .env of the app's root directory would work, but I also needed to write it for the heroku app as well.