πŸ’­ node.js - How to fix npm throwing error without sudo - Stack O...

!https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-error-without-sudo#answer-41395398

Copy this post

Its sad that this is not the accepted answer.

mkdir ~/.npm-global
export NPM_CONFIG_PREFIX=~/.npm-global
export PATH=$PATH:~/.npm-global/bin

Note

This post is a thought. It’s a short note that I make about someone else’s content online #thoughts