How to use this page
Use this after the install lessons. Commands are things to type. Words are things you may see.
Terminal commands
Type these into iTerm2, then press Return.
open https://nodejs.org/en/download/
Opens the official Node.js download page.
node -v
Shows the installed Node.js version.
npm -v
Shows the installed npm version.
node -e 'console.log("Hello, Mia")'
Runs one JavaScript line.
Words Mia may see
curl
Downloads from a web address.
bash
Runs installer instructions.
|
Passes one command into another command.
nvm
Installs Node versions.
node
Runs JavaScript on the Mac.
npm
Comes with Node. Installs JavaScript tools.
Safety rules
Use the official page
Use nodejs.org for the install block.
Respect curl | bash
It means “download something from the internet, then run it.” Treat it carefully.
Do not chase random fixes
If something fails, stop and ask before pasting forum commands.
Final safe check
Type only the lines marked TYPE THIS. Do not type lines marked MAC REPLIES or NOTE.
node -vnpm -vBoth commands should show version numbers after a successful install.