npm install: Error: EACCES: permission denied, mkd

2020-05-29 06:07发布

I attempted to do a sudo npm install -g appium on Mac OS 10.12.5.

I get this error:

info Chromedriver Install Installing Chromedriver version '2.30' for platform 'mac' and architecture '64'

info Chromedriver Install Opening temp file to write chromedriver_mac64 to...

Error: EACCES: permission denied, mkdir

'/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/2017820-44752-12jfqpb.z2hd'

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! appium-chromedriver@3.0.1 install: node install-npm.js npm ERR! Exit status 1 npm ERR!

this is not a dup question, as this install attempt was with sudo, as the other one was not.

3条回答
Juvenile、少年°
2楼-- · 2020-05-29 06:39

I reinstalled Node/NPM. Problem solved.

查看更多
唯我独甜
3楼-- · 2020-05-29 06:45

you are using npm so you have to use

sudo npm install --unsafe-perm
In unsafe mode with every command you run
hopefully, it will help

查看更多
我只想做你的唯一
4楼-- · 2020-05-29 06:58

sudo npm install -g appium --unsafe-perm=true --allow-root

Worked for me

查看更多
登录 后发表回答