Reinstall Node.js after clean wipe and install on Macbook Pro early 2011 and iMac mid 2010

Ed H AHSAA Blog
Ed's Blog Index & Contents

Oct 31, 2022 10:00

After doing a clean wipe and install of OSX I had to reinstall a few things including Node.js

How I installed npm (MacOS)

  1. After the clean install I had no npx or npm so I did the following on Macbook Pro
  2. click Node.js download and see this Latest LTS Version: 18.12.0 (includes npm 8.19.2)
  3. Click LTS
  4. click MacOS installer, or whatever operating system you use Windows, Linux, MacOS are all available for Node.js
  5. note: Latest LTS Version of Node.js as of 10/31/2022 = 18.12.0 and that includes npm 8.19.2
  6. download Node.js pkg to Macbook Pro and iMac
  7. open the pkg installer and see this
This package will install:
	•	Node.js v18.12.0 to /usr/local/bin/node
	•	npm v8.19.2 to /usr/local/bin/npm
  1. click continue
  2. Agree to the terms and continue and it will ask you for your admin password and finish the install.
This package has installed:
	•	Node.js v18.12.0 to /usr/local/bin/node
	•	npm v8.19.2 to /usr/local/bin/npm
Make sure that /usr/local/bin is in your $PATH.
type this command into terminal and see ...

 % npm --version
8.19.2
  1. no issues, npx is an easy 2 min install
  2. now type the following commands into Terminal. First go to the folder where you have 11ty installed. I have mine installed local to the Site I am working on which is 11ty-ahs so cd there then check what version of 11ty is running.
% pwd
/Users/edh/Sites
% cd 11ty-ahs
% npx @11ty/eleventy --version
1.0.2
  1. type this command to build your 11ty Site
  2. npx @11ty/eleventy --serve