Gathering detailed insights and metrics for why-is-node-running-tbodt
Gathering detailed insights and metrics for why-is-node-running-tbodt
npm install why-is-node-running-tbodt
Typescript
Module System
Min. Node Version
67.6
Supply Chain
96.3
Quality
74.8
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
522
Last Day
1
Last Week
2
Last Month
3
Last Year
55
31 Commits
2 Watching
3 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
2.0.2
Package Id
why-is-node-running-tbodt@2.0.2
Unpacked Size
10.23 kB
Size
3.74 kB
File Count
10
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
2
Compared to previous week
Last month
-25%
3
Compared to previous month
Last year
-28.6%
55
Compared to previous year
1
This package is a fork by tbodt with a couple of extra features. You probably shouldn't be using it.
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 () {
You can also run why-is-node-running
as a standalone if you don't want to include it inside your code. Sending SIGUSR1
signal to the process will produce the log.
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
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
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
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-01-06
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