Gathering detailed insights and metrics for why-is-node-running
Gathering detailed insights and metrics for why-is-node-running
Gathering detailed insights and metrics for why-is-node-running
Gathering detailed insights and metrics for why-is-node-running
Node is running but you don't know why? why-is-node-running is here to help you.
npm install why-is-node-running
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
485,354,959
Last Day
444,719
Last Week
9,192,204
Last Month
39,363,437
Last Year
336,111,306
MIT License
1,916 Stars
72 Commits
47 Forks
18 Watchers
1 Branches
15 Contributors
Updated on Jul 04, 2025
Minified
Minified + Gzipped
Latest Version
3.2.2
Package Id
why-is-node-running@3.2.2
Unpacked Size
8.64 kB
Size
3.73 kB
File Count
7
NPM Version
10.9.2
Node Version
23.5.0
Published on
Jan 08, 2025
Cumulative downloads
Total Downloads
Last Day
-5.9%
444,719
Compared to previous day
Last Week
-8%
9,192,204
Compared to previous week
Last Month
6%
39,363,437
Compared to previous month
Last Year
159.9%
336,111,306
Compared to previous year
No dependencies detected.
Node.js is running but you don't know why? why-is-node-running
is here to help you.
If you want to use why-is-node-running
in your code, you can install it as a local dependency of your project. If you want to use it as a CLI, you can install it globally, or use npx
to run it without installing it.
Node.js 20.11 and above (ECMAScript modules):
1npm install --save-dev why-is-node-running
Node.js 8 or higher (CommonJS):
1npm install --save-dev why-is-node-running@v2.x
1npm install --global why-is-node-running 2why-is-node-running /path/to/some/file.js
Alternatively if you do not want to install the package globally, you can run it with npx
:
1npx why-is-node-running /path/to/some/file.js
1import whyIsNodeRunning from 'why-is-node-running' // should be your first import 2import { createServer } from 'node:net' 3 4function startServer () { 5 const server = createServer() 6 setInterval(() => {}, 1000) 7 server.listen(0) 8} 9 10startServer() 11startServer() 12 13// logs out active handles that are keeping node running 14setImmediate(() => whyIsNodeRunning())
Save the file as example.js
, then execute:
1node ./example.js
Here's the output:
There are 4 handle(s) keeping the process running
# Timeout
example.js:6 - setInterval(() => {}, 1000)
example.js:10 - startServer()
# TCPSERVERWRAP
example.js:7 - server.listen(0)
example.js:10 - startServer()
# Timeout
example.js:6 - setInterval(() => {}, 1000)
example.js:11 - startServer()
# TCPSERVERWRAP
example.js:7 - server.listen(0)
example.js:11 - startServer()
You can run why-is-node-running
as a standalone if you don't want to include it inside your code. Sending SIGUSR1
/SIGINFO
signal to the process will produce the log. (Ctrl + T
on macOS and BSD systems)
1why-is-node-running /path/to/some/file.js
probing module /path/to/some/file.js
kill -SIGUSR1 31115 for logging
To trigger the log:
kill -SIGUSR1 31115
--import
option)You can also use Node's --import
option to preload why-is-node-running
:
1node --import why-is-node-running/include /path/to/some/file.js
The steps are otherwise the same as the above CLI section
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
packaging workflow detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 4/30 approved changesets -- score normalized to 1
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More