Gathering detailed insights and metrics for @crossan007/why-is-node-running
Gathering detailed insights and metrics for @crossan007/why-is-node-running
Gathering detailed insights and metrics for @crossan007/why-is-node-running
Gathering detailed insights and metrics for @crossan007/why-is-node-running
Node is running but you don't know why? why-is-node-running is here to help you.
npm install @crossan007/why-is-node-running
Typescript
Module System
Min. Node Version
Node Version
NPM Version
67.5
Supply Chain
98.6
Quality
75.1
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
1,218
Last Day
1
Last Week
6
Last Month
12
Last Year
100
MIT License
1,904 Stars
72 Commits
46 Forks
18 Watchers
1 Branches
15 Contributors
Updated on May 09, 2025
Minified
Minified + Gzipped
Latest Version
3.0.0
Package Id
@crossan007/why-is-node-running@3.0.0
Unpacked Size
6.66 kB
Size
2.98 kB
File Count
8
NPM Version
8.11.0
Node Version
16.15.1
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
100%
6
Compared to previous week
Last Month
-20%
12
Compared to previous month
Last Year
-73%
100
Compared to previous year
Node is running but you don't know why? why-is-node-running
is here to help you.
Node 8 and above:
1npm i why-is-node-running -g
Earlier Node versions (no longer supported):
1npm i why-is-node-running@v1.x -g
1const log = require('why-is-node-running') // should be your first require 2const net = require('net') 3 4function createServer () { 5 const server = net.createServer() 6 setInterval(function () {}, 1000) 7 server.listen(0) 8} 9 10createServer() 11createServer() 12 13setTimeout(function () { 14 log() // logs out active handles that are keeping node running 15}, 100)
Save the file as example.js
, then execute:
1node ./example.js
Here's the output:
There are 5 handle(s) keeping the process running
# Timeout
/home/maf/dev/node_modules/why-is-node-running/example.js:6 - setInterval(function () {}, 1000)
/home/maf/dev/node_modules/why-is-node-running/example.js:10 - createServer()
# TCPSERVERWRAP
/home/maf/dev/node_modules/why-is-node-running/example.js:7 - server.listen(0)
/home/maf/dev/node_modules/why-is-node-running/example.js:10 - createServer()
# Timeout
/home/maf/dev/node_modules/why-is-node-running/example.js:6 - setInterval(function () {}, 1000)
/home/maf/dev/node_modules/why-is-node-running/example.js:11 - createServer()
# TCPSERVERWRAP
/home/maf/dev/node_modules/why-is-node-running/example.js:7 - server.listen(0)
/home/maf/dev/node_modules/why-is-node-running/example.js:11 - createServer()
# Timeout
/home/maf/dev/node_modules/why-is-node-running/example.js:13 - setTimeout(function () {
Important Note!
unref
ed timers do not prevent the Node process from exiting. If you are running with Node v11.0.0 and above, unref
ed timers will not be listed in the above list. Unfortunately, this is not supported in node versions below v11.0.0.
You can also 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
You can also use the node -r
option to include why-is-node-running
:
1node -r 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
0 existing vulnerabilities detected
Reason
license file detected
Details
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
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
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-04-28
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