Node Package Managers · Part 7 — Lifecycle Scripts & node-gyp
Why npm install can compile C++ on your machine: lifecycle scripts (preinstall/install/postinstall), what node-gyp does, the N-API native addon model, and why postinstall is both essential and dangerous.