You are reading the right document if you install packages with npm, e.g.:
npm i -g unicorns
and after typing unicorns -v, you get unicorns: command not found.
sudo chown -R $USER /usr/local should solve the problem.
Make sure your prefix is /usr/local, (you can check it with npm config get prefix).
If not, you can set it with npm config set prefix /usr/local