Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webdriver-manager update error: EACCES, permission denied

I used to run Protractor tests successfully (on Mac) and I tried to upgrade version, so I ran

$npm install -g protractor

and it seemed like it worked - when running

$protractor --version

I get

Version 1.8.0

but now, when running

$webdriver-manager start

I get

 fs.js:642
  return binding.mkdir(pathModule._makeLong(path),
             ^
Error: EACCES, permission denied   '/usr/local/lib/node_modules/protractor/selenium'
at Object.fs.mkdirSync (fs.js:642:18)
at Object.<anonymous> (/usr/local/lib/node_modules/protractor/bin/webdriver-     manager:108:6)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3

any ideas?

like image 257
user2880391 Avatar asked Mar 16 '15 14:03

user2880391


1 Answers

You need to run webdriver-manager update with sudo:

$ sudo -s
$ webdriver-manager update
like image 184
alecxe Avatar answered Oct 19 '22 21:10

alecxe