Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

148
Views
how to access .env variables if running js script directly inside atom editor via script atom package?

I know it's possible to load variables from .env using dotenv, directly from running js inside atom via script atom package. But suddenly I made a change and I am uncapable to reproduce it once again. I checked the process.env variables and all from .env are gone. I use version "dotenv": "^10.0.0".

So.. is anyone being able to successfully perform this directly running inside atom using script atom package? On the contrary, it works perfectly if I run directly node mytest.js

require(dotenv).config();

console.log(process.env.PRIVATE_KEY);

Of course dotenv is appropriatelly inside node_modules, and .env is appropriatelly located in the top of the project,

PRIVATE_KEY=bla1Bla2Ble3Ble4

thank you

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!