Open Kernel-Panics opened 6 years ago
the file name with your environment variables should be in the root and simply called ".env" If you had copied the .env.example file to .env and filled out the Account SID, token, Twilio phone number and Twiml App SID - you should be good to go.
I thought I had remedied the problem, it seems this was not the case. I'm having a load of trouble with require('dotenv-safe').load(); in the index.js
despite creating a process.env file in the root of the program and filling in the details for my twilio services, it does not want to run at all:
My attempts to fix this problem lead me to think it was a versioning issue, something about the "dotenv-safe" as opposed to just "dotenv" was preventing the file from being read. Removing "-safe" did allow the program to start at least (with disconcerting errors) "require('dotenv').load();
Tested it out all the same, and sure enough it fails to retrieve the token (500 error)
I'm fairly sure the different looking errors have the same cause, and I'm fairly sure the cause is that dotenv isn't finding the process.env but for the life of me I can't figure why.