PrimeAcademy / biscayne-syllabus

1 stars 4 forks source link

halp! Not sure why my API Key is undefined / 'process undefined' #19

Closed janetscanlon closed 3 months ago

janetscanlon commented 3 months ago

Description

Your Real Name

janet

What do you want to happen? I want my CareTeamRegistration file to successfully be passed the API key in my .env file ! What is actually happening?

booooo it's being read as undefined. Either I get a Process is undefined or reading '.setAPIKey' is undefined! Screenshot 2024-06-17 at 10 04 01 AM

Screenshots / Code

Screenshot 2024-06-17 at 10 02 51 AM Screenshot 2024-06-17 at 10 03 03 AM Screenshot 2024-06-17 at 10 03 22 AM Screenshot 2024-06-17 at 10 03 34 AM Snippets

What did you try? Who did you ask?

tried/asked teammates! Also solo debugging last night for a few hours. Stackoverflow etc

I've changing syntax but it seems that my apiKey is being read as undefined and I'm not sure why :D

Google recommended that I import dotenv directly into the file where I want to use process.env.myapikey but I am getting a strange error that 'process' is undefined

What branch is your code on? Did you git push?

my branch is pushed up to github: feature/CareTeamRegistration

When was the last time you took a break?

matthew-black commented 3 months ago

Talked through the need to do the sgMail stuff server-side. :)