If you try to install a package globally on Linux through NPM you'll see a very common error message saying you don't have permission to access the folder, this is caused by your package manager and the way npm links it's binaries. When it's installed with sudo it requires sudo for it's operations which is really dangerous for installing applications like this, so today I'm going to show you a couple of simple fixes to deal with this such as nvm, webi and a brief mention of npx. Support The Channel ► Patreon: 🤍🤍patreon.com/brodierobertson ► Paypal: 🤍🤍paypal.me/BrodieRobertsonVideo ► Channel Membership: 🤍🤍youtube.com/channel/UCld68syR8Wi-GY_n4CaoJGA/join ► SubscribeStar: 🤍🤍subscribestar.com/brodierobertson ► Liberapay: 🤍liberapay.com/BrodieRobertson/ ► Locals: 🤍brodierobetson.locals.com/ Affiliate Links ► Amazon USA: 🤍amzn.to/3d5gykF ► Download Brave: 🤍brave.com/bro479 ► Join LBRY: 🤍lbry.tv/$/invite/🤍BrodieRobertson:5 ► Join Minds: 🤍🤍minds.com/register?referrer=brodierobertson Resources NVM GitHub: 🤍github.com/nvm-sh/nvm Node Web Installer: 🤍webinstall.dev/node/ NPX: 🤍🤍npmjs.com/package/npx =Video Platforms 📚 LBRY Podcast: 🤍open.lbry.com/🤍TechOverTea:3 🎥 YouTube Podcast: 🤍🤍youtube.com/c/TechOverTea 🎥 LBRY: 🤍open.lbry.com/🤍BrodieRobertson#5 📺 BitTube: 🤍bittube.tv/profile/BrodieRobertson 📺 BitChute: 🤍🤍bitchute.com/channel/agraFPUvUDeK/ Social Media 🎤 Discord: 🤍discord.gg/PkMRVn9 🐦 Twitter: 🤍twitter.com/BrodieOnYoutube 🌐 Mastodon: 🤍mstdn.social/🤍BrodieOnLinux 🧠 Minds: 🤍🤍minds.com/brodierobertson/ ✉️ Telegram: 🤍t.me/BrodieRobertson My Repos 🖥️ GitHub: 🤍github.com/BrodieRobertson Credits 🎨 Channel Art: All my art has was created by Supercozman 🤍twitter.com/Supercozman 🤍🤍instagram.com/supercozman_draws/ 🎵 Ending music Music from 🤍filmmusic.io "Basic Implosion" by Kevin MacLeod (🤍incompetech.com) License: CC BY (🤍creativecommons.org/licenses/by/4.0/) DISCLOSURE: Wherever possible I use referral links, which means if you click one of the links in this video or description and make a purchase we may receive a small commission or other compensation. I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and related sites.
You lost me there. Im using mint(Ubuntu debian) and there is no zshenv file.
hey can you share the config for alacritty terminal
so simple man,just follow simple steps from : docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
I use NVM even though I only need 1 version of NPM, it's just really convenient.
The fact that it installs things into home instead of root also eliminates permission headaches.
Hi I have the same error when installing prettier but that's not really my case I just tried it so we're on the same page. The thing is I have npm working fine before and after I installed php and mysql in my wsl ubuntu distro now npm run dev and npm run serve doesn't work suddenly, I have npm installed as well in laragon which I use in windows version for developing and works just fine and I want to use wsl for developing and this is one of the hardest issue I have so far.
i love you bro
Very useful video. I don't know why Linux distros package still package npm that way. I set the following variables for working `npm -g` and home folder cleanliness:
There is also a point to be made for not using npm -g at all and relying on npx instead...
This comment isnt related with this video but this is something bugging me. How do you manage cdrom with wm. Without using thunar or gui.
Personally I wouldn't prepend npm executables to my path but append it. I imagine a sneaky hacker could hijack common binaries using a npm module.
Did that once few years back and found that was huge mistake. It messed up the lib folder
'nvm' is SLOW you should use 'fnm' the fast node manager, you can also use 'n' as it is a NPM package making it easy to install
Why your memory/RAM usage take over 4 Gigs ? With just running few task.
Glad I'm not the only one removing packages with the -Rcns flag. Some say to remove packages with -Rns, some say with -Rs. But I never really noticed a difference, so I just pass them all :p
Are you from the USA?
Hey iǘe a problem, since i update npm my spaceship prompt appers whit this: "~ via ⬢ v14.6.0 ❯" instead of simple "~ ❯", and I don't now how to fix it.
Fun fact: /usr isn't actually short for "user", but for "unix system resources". Even though I know that, my mind still autocompletes to "user".
Nvm refused to support deno. For those bleeding edge addicts that upgraded to deno you can use dvm.
github.com/Schniz/fnm github.com/Schniz/fnm i using this method fnm iIt run faster than nvm. when i add nvm to my zsh my shell will run slow on startup then i switch to use fnm your