!!! note This post is a thought. It's a short note that I make about someone else's content online. Learn more about the process here

Here's my thought on 💭 node.js - How to fix npm throwing error without sudo - Stack Overflow

Its sad that this is not the accepted answer.

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

This post was a thought by Waylon Walker see all my thoughts at https://waylonwalker.com/thoughts