Is it possible to install Node.js on macOS High Sierra Version 10.13.6? This is the latest version my mid 2014 Macbook Pro can support
Asked Answered
K

6

8

My mid 2014 Macbook Pro can't be updated past High Sierra 10.13.6. I am trying to install ANY version of node.js. Is there any way to get Node.js running on my device? My end goal is to use Angular


I used brew to install node in Terminal:

brew install node

I was given this warning amongst other stuff:

Warning: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.

After installation, I tried the following:

node

I got this in response:

dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
Referenced from: /usr/local/bin/node (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
Referenced from: /usr/local/bin/node (which was built for Mac OS X 10.15) Expected in: /usr/lib/libSystem.B.dylib

Abort trap: 6

Kirstenkirsteni answered 6/12, 2022 at 22:1 Comment(2)
You could run linux in a virtual machine. The best VM software costs money but VirtualBox is free.Grandstand
@DaveS thank you very much for taking the time to read and comment Dave, I will look into this.Kirstenkirsteni
E
14

I ran into a similar problem and here's how I fixed it:

  1. Download and install nvm from this GitHub link: github.com/nvm-sh/nvm
  2. Run the following commands:

export NVM_DIR="$HOME/.nvm"

[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"

  1. Reload the bash_profile using source ~/.bash_profile
  2. Check if nvm is installed using nvm --version. You should get something like 0.39.2 in the output
  3. Once nvm is installed, run nvm install 17.9.1 to install Node 17.9.1
  4. Check node and npm versions to make sure they have been installed correctly using node -v and npm -v. You should get outputs like v17.9.1 and 8.11.0 respectively.
Elstan answered 21/12, 2022 at 16:59 Comment(4)
Thank you very much for this comment Aniket, I hope to try this when I feel up for itKirstenkirsteni
> source ~/.bash_profile < bash: /Users/[[redacted]]/.bash_profile: No such file or directoryRozina
I skipped the step and everything worked.Rozina
It can be also called .bash-profile (with hyphen).Aliber
B
6

I had the same problem...

I believe the last nodejs version suported by high sierra is v17.9.1

https://nodejs.org/download/release/v17.9.1/

Balch answered 7/12, 2022 at 15:17 Comment(3)
Thanks so much for reading and commenting Gabriel, I appreciate it! I will see if I can figure out how to install itKirstenkirsteni
Just download the .dmg file and install as a normal package.Dameron
Superb. I just installed node.js version 17.9.1 on mac OS Sierra v10.12.6 Thanks!Hydra
P
1

I'm not good at English, please read with consideration
You can also install node v22.2.0

brew install llvm@12

/usr/local/Homebrew/Library/Homebrew/shims/super/cc # on line 80

"#{ENV["HOMEBREW_PREFIX"]}/opt/llvm/bin/#{Regexp.last_match(1)}"

rewrite this as below

"#{ENV["HOMEBREW_PREFIX"]}/opt/llvm@12/bin/#{Regexp.last_match(1)}"

llvm@15 is required, there are several ways

How to install llvm@13 with Homerew on macOS High Sierra 10.13.6? Got "Built target lldELF" error

or

brew install --cc=llvm_clang llvm@15

download, Extraction, copying, takes time, before make

/tmp/llvmA15...../llvm-project-15.0.7.src/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm # on line 236

if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) {

rewrite this as below

if (cputype == CPU_TYPE_ARM64) {

After installing llvm@15

/usr/local/Homebrew/Library/Homebrew/shims/super/cc # on line 80

"#{ENV["HOMEBREW_PREFIX"]}/opt/llvm@12/bin/#{Regexp.last_match(1)}"

rewrite this as below

"#{ENV["HOMEBREW_PREFIX"]}/opt/llvm@15/bin/#{Regexp.last_match(1)}"

Set environment variables in .zshrc or .bashrc

export HOMEBREW_NO_INSTALL_FROM_API=1

brew edit node

rewrite line 36 as a comment

# on_macos do  
#   depends_on "llvm" => [:build, :test] if DevelopmentTools.clang_build_version <= 1100  
# end

Disable System Integrity Protection (SIP)

https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection

Rewrite header for c-ares installation,which depends on it

sudo vim /usr/include/dispatch/dispatch.h # line 38

#if !defined(HAVE_UNISTD_H) || HAVE_UNISTD_H

rewrite this as below

#if !defined(HAVE_UNISTD_H) // || HAVE_UNISTD_H

Copy and rewrite header for node installation

sudo cp /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/os/signpost.h /usr/include/os/

sudo vim /usr/include/os/signpost.h # on line 280
#define os_signpost_event_emit(log, event_id, name, ...) \\  
   os_signpost_emit_with_type(log, OS_SIGNPOST_EVENT, \\  
    event_id, name, ##__VA_ARGS__)

rewrite this as below

#define os_signpost_event_emit(log, event_id, name, ...)  
   // os_signpost_emit_with_type(log, OS_SIGNPOST_EVENT, \\  
    event_id, name, ##__VA_ARGS__)
brew install --cc=llvm_clang node

Enable SIP if you don't want to touch the system

Summarized, read the link for more details

https://github.com/orgs/Homebrew/discussions/4751

Phillida answered 19/3, 2023 at 10:44 Comment(0)
D
1

For mac 10.13.X the solution for me was to alter the nvm install version on my mac to:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash

then install the last version that works on my os.

`nvm install 16.20.2`

then nvm -v & node -v. both commands now return values rather than the error the original poster and I experienced. I selected the versions simply by correlating release dates from the nvm github repo and the Nodejs.org so these are untested in terms of compatibility on my mac but this has gotten me to start running frameworks

Dillion answered 18/9, 2023 at 20:46 Comment(0)
H
-1

I installed nodejs19 via macports on High Sierra

Heraldic answered 18/2, 2023 at 10:15 Comment(2)
This should be a comment not an answerMontanez
NodeJS19 does not work with High Sierra. The latest version to use with High Sierra is 17.9.1 as Gabriel stated and that is the easiest way to do it.Dameron
A
-1

In case you need new verson of nodejs. I believe, it's possible to install linux/windows on older macbooks to use nodejs 18+.

Aliber answered 26/8, 2023 at 10:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.