Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

150
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda