help with installing anything with npm #1115
Answered
by
afbjorklund
zeljkomarinkovic
asked this question in
Q&A
-
so i have started fresh VM user@lima-ubuntu:$ npm i -g bower
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/user.linux/.npm/_logs/2022-10-17T10_28_38_803Z-debug-0.log have i missed some step where i can get privileges or someone have solution for this? |
Beta Was this translation helpful? Give feedback.
Answered by
afbjorklund
Oct 17, 2022
Replies: 1 comment
-
You also need to set the prefix for node.js, for instance using something https://medium.com/@ExplosionPills/dont-use-sudo-with-npm-5711d2726aa3 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
zeljkomarinkovic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You also need to set the prefix for node.js, for instance using something
nvm
https://medium.com/@ExplosionPills/dont-use-sudo-with-npm-5711d2726aa3