Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install node 12 on macOS

I want to install node 12 on my macOS.

I tried brew. brew install node@12 prints this error,

Error: node@12 has been disabled because it is not supported upstream!

How do you install it anyway?

like image 512
Ilias Karim Avatar asked Feb 02 '26 16:02

Ilias Karim


2 Answers

For me, mac os monterey in 2023

  1. Goto : https://nodejs.org/download/release/v12.22.12/

  2. Download installer from: https://nodejs.org/download/release/v12.22.12/node-v12.22.12.pkg

  3. Run the installer, notice this path:

• Node.js v12.22.12 to /usr/local/bin/node
• npm v6.14.16 to /usr/local/bin/npm

  1. Update the path:
echo 'export PATH="/usr/local/bin/node/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Reopen terminal and check.

like image 146
Hieu Nguyen Avatar answered Feb 04 '26 05:02

Hieu Nguyen


Node 12 is EOL however you can force install it by editing the formulae locally. See similar post here: Can you install disabled Homebrew packages?

  1. brew edit node@12
  2. Comment out the line disable! date: "2022-04-30", because: :unsupported . Save the file.
  3. brew install node@12
like image 33
Justin Fiedler Avatar answered Feb 04 '26 07:02

Justin Fiedler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!