Expected the `PROGRAM_NAME` variable to be defined in `app.js`

Hi,

I am currently sitting the Full-Stack Engineer Exam (part 2) and I have 4/5 green tick marks, but I am receiving the same error - I have checked everything and it seems to be correct (even after some googling)

The error is Expected the PROGRAM_NAME variable to be defined in app.js. - which it is!

Please someone tell me where I am going wrong? :frowning:

I stuck with the same problem(( Did you manage to find a solution?

Hi,

I certainly did! I used this method in the end…

// Define the PORT and PROGRAM_NAME variables

const PORT = process.env.PORT;
const PROGRAM_NAME = process.env.PROGRAM_NAME;

I was trying to link PORT 4001 and Movie App and for some reason it was throwing the error message!

Hope this works for you!

1 Like

Thanks a lot! That really helped me.

1 Like