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?