appium: Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/2018018-10989-mszb1e.83yx'

I am trying to install Appium on Mac using the following steps:

I followed the setup process

brew install node # get node.js npm install -g appium # get appium npm install wd # get appium client appium & # start appium

I am blocked at the Appium install process due to the following error.

Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/2018018-10989-mszb1e.83yx’ npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! appium-chromedriver@3.1.4 install: node install-npm.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the appium-chromedriver@3.1.4 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

The log is provided below.

34152 /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver
34153 silly lifecycle appium-chromedriver@3.1.4~install: Args: [ '-c', 'node install-npm.js' ]
34154 silly lifecycle appium-chromedriver@3.1.4~install: Returned: code: 1  signal: null
34155 info lifecycle appium-chromedriver@3.1.4~install: Failed to exec install script
34156 verbose unlock done using /Users/u205188/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
34157 verbose stack Error: appium-chromedriver@3.1.4 install: `node install-npm.js`
34157 verbose stack Exit status 1
34157 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
34157 verbose stack     at emitTwo (events.js:126:13)
34157 verbose stack     at EventEmitter.emit (events.js:214:7)
34157 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
34157 verbose stack     at emitTwo (events.js:126:13)
34157 verbose stack     at ChildProcess.emit (events.js:214:7)
34157 verbose stack     at maybeClose (internal/child_process.js:925:16)
34157 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
34158 verbose pkgid appium-chromedriver@3.1.4
34159 verbose cwd /Users/u205188
34160 verbose Darwin 16.7.0
34161 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "appium"
34162 verbose node v8.9.4
34163 verbose npm  v5.6.0
34164 error code ELIFECYCLE
34165 error errno 1
34166 error appium-chromedriver@3.1.4 install: `node install-npm.js`
34166 error Exit status 1
34167 error Failed at the appium-chromedriver@3.1.4 install script.
34167 error This is probably not a problem with npm. There is likely additional logging output above.
34168 verbose exit [ 1, true ]

How can I resolve this issue. Any help is appreciated

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 20 (2 by maintainers)

Commits related to this issue

Most upvoted comments

This worked: sudo npm install -g appium --unsafe-perm=true --allow-root (from #10293).

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

This command helped me on ubuntu 18.10 version Try and provide your feedbacks

This is not funny, keep getting that issue, Aug 2018

Update npm documentation at least, @rkrisztian advice works.

Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/2018018-10989-mszb1e.83yx’

Make sure your user has write permissions under /usr/local/lib. Closed as non Appium-related issue

Had some other issues, adding --force solved it on Mac Mojave: sudo npm install -g appium --unsafe-perm=true --allow-root --force

This worked: sudo npm install -g appium --unsafe-perm=true --allow-root (from #10293).

Thanks, this worked for me.

This worked: sudo npm install -g appium --unsafe-perm=true --allow-root (from #10293).

Thank you - This worked for me running on a Mac OS Catalina.