fac24 / week3-alex-bereket-hallie-peter

https://afternoon-mesa-46889.herokuapp.com/
1 stars 1 forks source link

Heroku is crashing because of a missing dependency #26

Open oliverjam opened 2 years ago

oliverjam commented 2 years ago

https://github.com/fac24/week3-alex-bereket-hallie-peter/blob/d217cd163d5b6025ba85217220e1c75404c6cef3/database/connection.js#L2-L4

You are referencing dotenv in your code, but it's in your devDependencies in your package.json. Heroku doesn't install devDependencies because they're supposed to only be used locally.

You shouldn't need to reference dotenv anywhere in code: your dev npm script already does this for local development (the -r dotenv/config bit). In production Heroku will set any environment variables for you (assuming you've configured them in your admin dashboard or using the Heroku CLI)

oliverjam commented 2 years ago

A bit more info in this issue (and on Discord) https://github.com/fac24/week3-Asmahan-Hussain-Maria-Petra/issues/31