Currently I always run sudo npm install
but as I understand it\'s not correct.
I want to have opportunity not to use it as root/Adm
In my opinion is the cleanest way to specify the npm prefix:
npm config set prefix ~/.node_modules
And then to add the following to you .bash_profile
export PATH=$HOME/.node_modules/bin:$PATH
Now the packages will install into your user directory and no permissions will be harmend.
EDIT: If you can't install yeoman, create a bash file in one of your PATH directories named yodoctor with the following contents
#!/bin/bash
yo doctor
Make the file executable with
chmod +x yodoctor
And now you should be able to install yeoman.