question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

node does not exit

See original GitHub issue

i use prom-client version 12.0.0.

when i run jest --detectOpenHandles i get

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

  ●  ELDHISTOGRAM

      3 | const client = require("prom-client");
      4 | const prefix = "name_";
    > 5 | client.collectDefaultMetrics({ prefix });

following not returning an interval, i saw the docs update. also looked at the tests and saw that indeed clearInterval() is called.

could one please shed the light on how should prom-client be closeed properly?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sam-githubcommented, May 6, 2020

It should be unrefed, best to avoid exit handlers, except it doesn’t appear to have a documented unref. It might be there anyway, I’ll go look.

subject should be fixed, “exists” was meant to be “exit”, I think.

0reactions
micaelmbagiracommented, Feb 26, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

my nodejs script is not exiting on its own after successful ...
I just went through this issue. The problem with just using process.exit() is that the program I am working on was creating handles, ......
Read more >
How to Exit a Process in Node.js: process.exit() Method
If your Node.js process is not terminated properly, you can use the exit() function to terminate it forcefully. You need to do this...
Read more >
How to Exit in Node.js - Stack Abuse
Exiting from a Node.js program started at the command line can be as simple as waiting for the script to finish executing. Implicitly,...
Read more >
Node script not exiting · Issue #4054 · nrwl/nx - GitHub
It exits fine when just using node dist/apps/script/main.js but not when using nx serve script , so it's definitely not my script.
Read more >
How to exit process in Node.js ? - GeeksforGeeks
Method 1: Using ctrl+C key: When running a program of NodeJS in the console, you can close it with ctrl+C directly from the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found