Error: EACCES: permission denied

#1

Hi,

I’m running the following command
sudo npm install -g appium

This throws
Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/appium/node_modules/appium-chromedriver/...

Tried to set right permissions with
sudo chown -R '$USER' /usr/lib/node_modules/
Output
sudo chown -R '' /usr/lib/node_modules/ (empty user??)

Tried many other variants
sudo chown -R $USER:admin /usr/lib/node_modules/ (empty for USER)
sudo chown -R $USER:$GROUP /usr/lib/node_modules/ (all empty for USER and GROUP)
sudo chown -R $(id -gn $USER) /usr/lib/node_modules/ (states ‘root’)

Other configurations I tried

sudo apt-get remove -y nodejs
sudo apt-get install -y nodejs
sudo chown -R $(id -gn $USER) /usr/lib/node_modules/
sudo npm install -g appium

sudo npm install npm
sudo npm install node
sudo chown -R $(id -gn $USER) /usr/lib/node_modules/
sudo npm install -g appium

Nothing works.
Any idea?

0 Likes

#2

Any help? plus more unnecessary text to reach the 10 characters…

0 Likes

closed #3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

0 Likes