ENOENT: no such file or directory, open '.env'
lungera (1)

Hi, I created a repl, added a .env file but when I run it, it says there's no .env file.

You are viewing a single comment. View All
a5rocks (732)

That may not be possible for all I know. However, you can just use process.env.<VARIABLE NAME>

lungera (1)

@a5rocks it worked a few days ago and I can't use process.env because it's not a proper env file.

a5rocks (732)

@lungera hmm what are you trying to put into the .env file? Just do something like:

CONTENTS=lol pretend this was what was in your file.

Then just process.env.CONTENTS

lungera (1)

@a5rocks the content is multiple lines.