错误的ERR! appium-chromedriver@3.1.4安装:`node install-npm.js`

时间:2023-01-21 09:24:05

Install appium on os x

在os x上安装appium

Command execute:$ sudo npm install -g appium@1.7.2

命令执行:$ sudo npm install -g appium@1.7.2

Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/2018422-31132-799ew3.4ynnk'

错误:EACCES:权限被拒绝,mkdir'/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/2018422-31132-799ew3.4ynnk'

npm ERR! code ELIFECYCLE

错误的ERR!代码ELIFECYCLE

npm ERR! errno 1

错误的ERR!错误1

npm ERR! appium-chromedriver@3.1.4 install: node install-npm.js

错误的ERR! appium-chromedriver@3.1.4安装:node install-npm.js

npm ERR! Exit status 1

错误的ERR!退出状态1

npm ERR!

错误的ERR!

npm ERR! Failed at the appium-chromedriver@3.1.4 install script.

错误的ERR! appium-chromedriver@3.1.4安装脚本失败。

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

错误的ERR!这可能不是npm的问题。上面可能有额外的日志记录输出。

npm ERR! A complete log of this run can be found in:

错误的ERR!可以在以下位置找到此运行的完整日志:

npm ERR!
/Users/oliveira/.npm/_logs/2018-05-23T01_24_48_805Z-debug.log

错误的ERR! /Users/oliveira/.npm/_logs/2018-05-23T01_24_48_805Z-debug.log

2 个解决方案

#1


0  

You can try to change ownership of your node_modules folder with

您可以尝试使用更改node_modules文件夹的所有权

sudo chown -R $(whoami) /usr/local/lib/node_modules/

sudo chown -R $(whoami)/ usr / local / lib / node_modules /

#2


0  

Either change the ownership of the whole node project by

要么改变整个节点项目的所有权

sudo chown -R userName pathToProject

-R will recursively change the ownership of all the directory and files inside the project.

-R将递归更改项目内所有目录和文件的所有权。

If you don't want to change the ownership you can run the command by the superuser.

如果您不想更改所有权,则可以由超级用户运行该命令。

#1


0  

You can try to change ownership of your node_modules folder with

您可以尝试使用更改node_modules文件夹的所有权

sudo chown -R $(whoami) /usr/local/lib/node_modules/

sudo chown -R $(whoami)/ usr / local / lib / node_modules /

#2


0  

Either change the ownership of the whole node project by

要么改变整个节点项目的所有权

sudo chown -R userName pathToProject

-R will recursively change the ownership of all the directory and files inside the project.

-R将递归更改项目内所有目录和文件的所有权。

If you don't want to change the ownership you can run the command by the superuser.

如果您不想更改所有权,则可以由超级用户运行该命令。