I am using my corporate's laptop and am a new mac User (used Ubuntu before) :
- OS: macOS Monterey Version 12.2
There are two accounts, administrator and mine - I don't have sudo rights. To install homebrew without administrator rights, I followed this Installation.
To install the node - I used brew install node. Both node -v and npm -v were working. When I restarted the laptop, I cannot find node/npm.
On running $ node -v, I get -bash: node: command not found (I changed my default terminal from zsh to bash and the output is the same for both of them)
I tried this solution but couldn't find nvm in the system. Am new to mac and I believe nvm is some kind of package manager like homebrew so this solution is not applicable to me (correct me if I am wrong).
How can I install things in my system without sudo rights and keep them permanently(like node)?
EDIT:
(After adding brew to the PATH) On running -
brew list|grep node, I got -node$ echo $PATHgives/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/parthkapadia/homebrew/bin
EDIT2:
- Adding brew to path solved the issue, now I can even access node and npm (even after restarting). I used this site to add homebrew/bin to path (in zsh terminal)