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

290
Vistas
How to start docker with "node -r esm app.js"?

I have installed esm package and application is working fine when using "node -r esm app.js" for local server but for production server How to make it work same with the docker?

If someone could either help me with this loading the esm module it would be appreciated..

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Your node installation likely doesn't use globally installed modules. You need to correctly set the NODE_PATH environment variable to point either to the global node modules or those in your app folder, it should work.

Say if you are using the official node docker image as a base and you are installing your stuff with npm install -g or npm install && npm link, then you need to set

ENV NODE_PATH=/usr/local/lib/node_modules

in the dockerfile.

about 4 years ago · Juan Pablo Isaza Denunciar
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