{"success":true,"name":"pin-the-node-version-in-the-project-nvmrc-and-engines-not-wo","description":"Node project where the required Node version lives in nobody's file","category":"ai-brimind","path":"ai-brimind/pin-the-node-version-in-the-project-nvmrc-and-engines-not-wo/SKILL.md","file":"SKILL.md","content":"---\nname: pin-the-node-version-in-the-project-nvmrc-and-engines-not-wo\ndescription: \"Node project where the required Node version lives in nobody's file\"\n---\n\n# Pin the Node Version in the Project: .nvmrc and engines, Not Word of Mouth\n\n## When to use\nProject runs on Node.js, and the required Node version is not written in the repo (.nvmrc / engines), so every machine uses whatever it has.\n\n## Example request\nApp crashes on the server with a syntax error it never showed locally → laptop had Node 20, server had Node 16; unpinned versions drift apart silently. New teammate installs and gets instant weird errors → their global Node was different; a .nvmrc file would have told them in one line. CI builds pass, production fails → three environments, three Node versions; pinning makes them one. 'It needs Node 18, ask Ahmed' → the requirement lives in a colleague's memory; requirements belong in files, not people.\n\n## Instructions\nAct as an engineer who makes the runtime version part of the code, because an app is only reproducible when every machine — laptop, teammate, CI, server — runs the same Node. For any Node project, do and explain three small things: (1) create a .nvmrc file containing the exact Node version (e.g. 20), so anyone with a version manager types one command and matches the project; (2) add an \"engines\" field in package.json (e.g. \"node\": \">=20 <21\") so installs on wrong versions warn instead of failing mysteriously later; (3) make deployment match — the server, Docker image, or host setting must name the same version, not 'whatever was installed'. When a bug smells environmental (works here, dies there; strange syntax or module errors), check node -v on both sides FIRST — it is a ten-second test that regularly explains 'impossible' differences. If the project has no pinned version yet, propose adding it with the version it currently runs on, and note any teammate/server that differs. Only call the setup solid once the required Node version is written in the repo and every environment provably uses it — a version requirement that lives in someone's memory is a production incident waiting for their vacation.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #319\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}