Node.js Runtime Checklist
Node.js incidents often come from a runtime mismatch rather than a JavaScript bug. The shell may use one Node version, CI may use another, the production service may start from a stale directory, or the package manager may install a lockfile differently than expected. Node.js publishes current downloads and release options at nodejs.org/en/download; this checklist focuses on proving what is actually running.
Identify Node and package managers
node --version
npm --version
npx --version
corepack --version
which node
which npm# Windows PowerShell
node --version
npm --version
Get-Command node
Get-Command npm
where node
where npmRead package intent before running scripts
Before you rerun a failing app, inspect the scripts, engines and dependency manager hints. This prevents accidental production-like commands on the wrong host.
node -p "process.version"
node -p "process.execPath"
node -p "process.platform + ' ' + process.arch"
npm pkg get scripts
npm pkg get engines
ls package-lock.json yarn.lock pnpm-lock.yaml 2>/dev/nullInstall and dependency checks
npm ci
npm audit --omit=dev
npm outdated --depth=0
npm ls --depth=0
node -e "console.log(process.env.NODE_ENV || 'NODE_ENV not set')"Ports, processes and logs
When a Node API, Vite app, Next.js app or Express server does not respond, prove the process, port and service manager first.
ps aux | grep '[n]ode'
ss -tulpn | grep -E 'node|:3000|:5173|:8080' 2>/dev/null
pm2 list 2>/dev/null
pm2 logs --lines 80 2>/dev/null
systemctl status my-node-app --no-pager
journalctl -u my-node-app -n 120 --no-pagerCommon Node.js runtime failures
| Symptom | Check first | Likely direction |
|---|---|---|
| Build works locally, fails in CI | Node version, lockfile, package manager, environment variables | CI does not match the developer runtime. |
| Port already in use | ss, netstat, service manager, PM2 list | An old process is still bound to the port. |
| Module not found | Lockfile, install command, workspace path, NODE_PATH | Dependencies were installed in a different directory or mode. |
| Static build stale | Build output timestamp, deployment commit, CDN cache | The server is serving an older artifact. |
| Memory crash | Container limits, NODE_OPTIONS, logs, heap usage | The process limit differs from the host memory. |
Deployment evidence to save
date -Is
hostname
git rev-parse --short HEAD
node --version
npm --version
npm pkg get scripts
printenv | grep -E 'NODE|NPM|PORT|HOST|DATABASE|REDIS' | sortBefore changing JavaScript, prove the runtime. Node version, package manager, script command, working directory, port and service logs usually reveal the real failure path.
Related: Docker Compose Debugging, API Debugging Handbook, Linux Admin Commands.