Node.js public

Node Engine Check

Share this script safely, inspect its metadata, and copy the exact command you need.

Dashboard

Ready to run

One-liner

Copy the command, then review before execution.
curl -fsSL https://runny.sh/r/02ZSE2Q0Y7EN | node

Current version: 1.1 · Updated by Godmode · 2026-09-07 02:38:59.701

At a glance

Script metadata

Slug
02ZSE2Q0Y7EN
Fetches
0
Size
1462 B · 54 lines
Expires
never
Last fetch
Created
2026-09-07 00:36:01.345
Description
Node and npm versions, warn below 18

Readable before runnable

Preview

#!/usr/bin/env node
// Node engine check
// Read-only: prints node and npm versions. Warns if node major is below 18.
// Exit 0 if healthy, 1 if node < 18 or npm is missing, 2 if node cannot be identified.
// Hosted on Runny.sh. Review the script page before you run it.

'use strict';

const { execFileSync } = require('child_process');

function note(line) {
  process.stdout.write(String(line) + '\n');
}

note('=== Node engine check ===');
const version = process.versions.node || '';
const major = parseInt(String(version).split('.')[0], 10);
note('Node:     ' + (process.version || 'unknown'));
note('V8:       ' + (process.versions.v8 || 'unknown'));
note('Platform: ' + process.platform + ' ' + process.arch);

let npm = '';
try {
  npm = String(execFileSync('npm', ['--version'], { encoding: 'utf8' })).trim();
  note('npm:      ' + npm);
} catch (_err) {
  note('npm:      not found in PATH');
}

let status = 0;
if (!Number.isFinite(major)) {
  note('          CRITICAL: node major version is unreadable');
  status = 2;
} else if (major < 18) {
  note('          WARNING: node major ' + major + ' is below 18 (maintenance risk)');
  status = 1;
} else {
  note('          OK');
}
if (!npm && status < 1) {
  note('          WARNING: npm CLI is not available');
  status = 1;
}

note('');
if (status === 0) {
  note('Result: HEALTHY');
} else if (status === 1) {
  note('Result: WARNING');
} else {
  note('Result: CRITICAL');
}
process.exit(status);

Raw endpointhttps://runny.sh/r/02ZSE2Q0Y7EN

See something unsafe?

Report this script

Tell us why it should come down. Anyone can also report a URL at /abuse.

Restore revision