Require dotenv in package.json

Hey, this is my first post in support, please help me out if I’m doing something wrong here.

I love the Glitch platform, but decided to download it locally to my ubuntu machine to play with a local Mongo server.

Unfortunately I ran into a little problem in which certain variables weren’t working. After playing around with settings for about 15 minutes, I realized that my env variables weren’t loading, and that my package.json did not include the dotenv dependency. So I installed it and everything worked.

It appears that on Glitch you can add env variables into a .env file with no setup required. On a local machine, this is not the case as you have to have the dotenv package installed. I suggest that on glitch the dotenv file should be saved in package.json so that when other users download a project for the first time and run npm install it will work out of the box.

I realised the same just now! is that the only thing that’s implicit, any other modules which are implicitely loaded? I think since Glitch uses it, it doesnt want it user configurable, but they can keep it commented out, and suggest to be enabled in offline mode maybe.

Regards