I am having problems running node.js from the terminal.
I have run the node.js installer for mac, but when I try to use the node command in the terminal, I get the following error:
-bash: node: command not found
I have been trying to look for a solution but all the suggestions I found, dont help
In the folder /usr/local/bin I have node and npm, but even when I navigate to the folder and run node, I still get the same error. I don't understand why this is happening, because I can see that node exists in the folder.
I also tried to edit the .bash_profile by adding /usr/local/bin but that didn't resolve the issue either
Any suggestions would be greatly appreciated! TIA!
To see if Node is installed, type node -v in Terminal. This should print the version number so you'll see something like this v0.
To change Node. JS versions, we have to first download the version we want. Make sure you have nvm installed first. If you don't know the version you want to install, type nvm ls-remote to get a full list of all installable Node.
brew search node
then brew install node@version
, example:
brew install node@8
brew link node@8
node --version
Still getting node not found, try this:
brew link --overwrite --force node@8
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With