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

79
Views
How to handle log events with the npmlog library?

this might be an easy question for you but I am struggling with it. I want to catch the events thrown by the npmlog library as described here: https://www.npmjs.com/package/npmlog

How do I create an event listener on those? There is no .on() function neither can I create an instance of log beforehand.

import * as log from 'npmlog';
log.error('problem', 'some message');

// What I would like to do:
log.on("error", ()=>{do something})

Thank you very much for your help!

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!