TwilioDevEd / browser-dialer-vue

A browser-based dialer interface powered by Vue.js and Twilio Client
https://www.twilio.com/docs/tutorials/walkthrough/browser-dialer/node/vue
MIT License
27 stars 19 forks source link

Error: Missing Environment variables #5

Open Kernel-Panics opened 6 years ago

Kernel-Panics commented 6 years ago

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: 2018-04-06 15_12_31-mingw64__c_users_kernel panics_documents_creations_twilbil

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(); 2018-04-06 15_21_53-mingw64__c_users_kernel panics_documents_creations_twilbil

Tested it out all the same, and sure enough it fails to retrieve the token (500 error) 2018-04-06 15_27_37- 19 recreated - _pan galactic gargle blaster_ from hitchhiker s guide to the ga

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.

gbshahaq commented 4 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. image