Instruction file imported from alienfacepalm/prizepicks-coderbyte (
.cursor/rules/node-version-nvmrc.mdc). Copyright stays with the author.
Node.js Version — Always Activate .nvmrc Before Any Command
- Every shell command the agent runs must first ensure the correct Node.js version from
.nvmrcis active. - Prefix all shell commands with the nvm activation snippet:
source ~/.nvm/nvm.sh && nvm use && <your command> - This applies to all commands — not just obvious Node/pnpm/Vite ones. Includes but is not limited to:
pnpm install,pnpm add,pnpm runnpx, and other Node-invoking CLIsnode,vite,tsc,vitest,jest- Build, test, lint, serve, and any script execution
- Do not assume the shell already has the right Node version; always activate explicitly.
- The current
.nvmrcversion is24.14.0. Use Node 22+ for current Vite / toolchain compatibility. - If a command fails with
ERR_REQUIRE_ESM, the most likely cause is the wrong Node version — re-run with the nvm prefix.