I installed node and made sure that /usr/local/bin is in my $PATH.
I checked for node install version and location
[~]$node -v
v10.15.1
[~]$which node
/usr/local/bin/node
Why, when I cd into /usr/local/bin/, is there nothing there?
I'm on MacOS Mojave Version 10.14.2. I installed node version 10.15.1 using the installer downloaded from nodejs.org, and using the default options in the installer.
Here are the notes i took from the installer:
Welcome to the Node JS Installer -> This package will install:
• Node.js v10.15.1 to /usr/local/bin/node
• npm v6.4.1 to /usr/local/bin/npm
Select the disk where you want to install nodejs -> MacintoshHD
(clicked install) ...
This package has installed:
• Node.js v10.15.1 to /usr/local/bin/node
• npm v6.4.1 to /usr/local/bin/npm
Make sure that /usr/local/bin is in your $PATH.
Checked /usr/local/bin is in $PATH.
[~]$echo $PATH
:~/usr:bin:~/bin:usr/local/bin:usr/bin:/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:
But the when I check where node is installed:
[~]$which node
/usr/local/bin/node
[~]$cd usr/local/bin/node
-bash: cd: usr/local/bin/node: No such file or directory