1

I tried to install the protractor globally with npm install -g protractor

Here is the error message,I got it in every case. I installed globally the protractor before,and worked well.

npm WARN   errno: -4048,
npm WARN   code: 'EPERM',
npm WARN   syscall: 'lstat',
npm WARN   path: 'c:\\x\\y\npm\\node_modules\\protractor\\node_modules\\web
driver-manager\\node_modules' }
npm ERR! path c:\x\y\npm\node_modules\protractor\node_modules\.webdriver-man
ager.DELETE\selenium\chromedriver_2.26.exe
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'c:\x\y\npm\node_modu
les\protractor\node_modules\.webdriver-manager.DELETE\selenium\chromedriver_2.26
.exe'
npm ERR!  { Error: EPERM: operation not permitted, unlink 'c:\x\y\npm\node_m
odules\protractor\node_modules\.webdriver-manager.DELETE\selenium\chromedriver_2
.26.exe'
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, unlink 'c:\x\y\npm\node
_modules\protractor\node_modules\.webdriver-manager.DELETE\selenium\chromedriver
_2.26.exe'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'unlink',
npm ERR!      path: 'c:\\x\\y\\npm\\node_modules\\protractor\\node_modules\\
.webdriver-manager.DELETE\\selenium\\chromedriver_2.26.exe' },
npm ERR!   stack: 'Error: EPERM: operation not permitted, unlink \'c:\\x\\y\
\npm\\node_modules\\protractor\\node_modules\\.webdriver-manager.DELETE\\seleniu
m\\chromedriver_2.26.exe\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path: 'c:\\x\\y\\npm\\node_modules\\protractor\\node_modules\\.we
bdriver-manager.DELETE\\selenium\\chromedriver_2.26.exe',
npm ERR!   parent: 'protractor' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     c:\x\y\local\npm-cache\_logs\2017-08-22T15_38_20_888Z-debug.log

I can not do anything to this. Is there any idea to this one.

user3654435
  • 77
  • 2
  • 10

3 Answers3

0

The problem looks like due to the caching. Clear you cache before installing

npm cache clean
npm install -g protractor

If above command won't help then delete entire .webdriver-manager.DELETE directory from your_path/.../node_modules/ and issue again above two commands.

Surendra Jnawali
  • 3,190
  • 5
  • 28
  • 44
0

npm ERR! Error: EPERM: operation not permitted, unlink 'c:\x\y\npm\node_modu les\protractor\node_modules\.webdriver-manager.DELETE\selenium\chromedriver_2.26

Is there any running chromedriver.exe on Windows Task Manager. If answer is yes, kill and try again

0

When you download and install NPM make sure you have the latest version. Open your command prompt and type this. This might take a while to install.

npm install npm@latest -g

Or this try this link

After checking your npm version with this command

npm --version

type this to install protractor

npm install -g protractor

Then check if protractor was successfully installed by checking the version you have

protractor --version

Raymond Dumalaog
  • 353
  • 4
  • 13