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

289
Views
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 answers
Answer question

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 Report
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!