Home > OS >  How to know how I installed Node on macOS?
How to know how I installed Node on macOS?

Time:09-23

I know that I have Node installed but I don't remember if I used NVM, Brew or if I downloaded it from the official Node website. Is there any command I can use to figure out how I installed it in the first place?

Note: I use a zsh shell on macOS

CodePudding user response:

A good indicator is to check where it is installed:

ls -l $(which node)

For brew, this will yield something like

lrwxr-xr-x  1 flyx  admin  30 Sep 12 17:02 /usr/local/bin/node -> ../Cellar/node/16.9.1/bin/node

NVM seems to install it somewhere in ~/.nvm but I don't know the specifics. I have no idea what the installer does.

  • Related