Some of my node modules get installed but there are always these sort of issues on this particular linux mint machine
npm install
npm ERR! Error: EACCES,
UPDATE. See this answer for a better way.
You have to set correct permissions (ownership) so npm
can access your (sub)directories with your normal user permissions:
sudo chown -R $USER
where in your case
is /home/me
and -R
is for recursive to also change ownership of all your subdirectories, which is exactly what you want. That should fix the EACCESS
issue.
Sadly the advise to run the command as root/Administrator
is wrong here.
You want to avoid running npm
with sudo
ever, as recommended by the npm creator Isaac Schlueter:
I strongly encourage you not to do package management with sudo! Packages can run arbitrary scripts, which makes sudoing a package manager command as safe as a chainsaw haircut. Sure, it’s fast and definitely going to cut through any obstacles, but you might actually want that obstacle to stay there.
See here for more details.