π node.js - How to fix npm throwing error without sudo - Stack O... Waylon Walker Author April 9, 2024 1 min read !https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-error-without-sudo#answer-41395398 Copy this post URL Rich Markdown Text View Markdown View Text curl .ansi External Link stackoverflow.com 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