zsh: command not found: n
$ npm prefix --global /usr/local $ sudo npm install -g n /usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n + n@6.0.1 $ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin $ command -v n /usr/local/bin/n $ n --version 6.0.1
Here is what the above code is Doing:
1. Install n globally
2. Check the global prefix
3. Install n globally again
4. Check the global prefix
5. Check the PATH
6. Check the PATH again
7. Check the version of n