
When npm install Fails with SELF_SIGNED_CERT_IN_CHAIN in Corporate Networks (Zscaler + Node 22 Deep Dive)
🚨 The Problem Suddenly, npm install started failing across all projects with: SELF_SIGNED_CERT_IN_CHAIN It wasn’t repo-specific. It wasn’t npm registry downtime. It wasn’t a corrupt cache. It happened everywhere. Environment: Node.js v22.x npm v10.x Corporate network (Zscaler SSL Inspection) Windows + Git Bash 🔍 What Was Really Happening? Our company uses Zscaler SSL Inspection , which performs TLS interception (MITM) for outbound HTTPS traffic. So instead of the normal TLS chain: registry.npmjs.org ↑ Public CA The actual chain becomes: registry.npmjs.org (re-signed) ↑ Zscaler Intermediate ↑ Internal Enterprise CA ↑ Enterprise Root CA This is normal in enterprise environments. ❓ Why Did It Suddenly Break? The key trigger was: Node.js v22 tightened TLS validation behavior. Older Node versions were more tolerant about incomplete chains. Node 22: Uses OpenSSL 3.x Enforces stricter certificate validation Does not auto-reconstruct incomplete intermediate chains Providing only the enterprise
Continue reading on Dev.to JavaScript
Opens in a new tab



