npm ERR! code EPERM while installing vue-cli

4.6k views Asked by At

When i run npm install -g vue-cli , it continuously throws this error message:

Screen shot

npm ERR! path C:\Users\End User\AppData\Roaming\npm\node_modules\vue-cli\node_modules\nan\package.json npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall unlink npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\End User\AppData\Roaming\npm\node_modules\vue-cli\node_modules\nan\package.json' npm ERR! at Error (native) npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\End User\AppData\Roaming\npm\node_modules\vue-cli\node_modules\nan\package.json' npm ERR! at Error (native) npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'C:\Users\End User\AppData\Roaming\npm\node_modules\vue-cli\node_modules\nan\package.json\'\n at Error (native)', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: 'C:\Users\End User\AppData\Roaming\npm\node_modules\vue-cli\node_modules\nan\package.json' } 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:\Users\End User\AppData\Roaming\npm-cache_logs\2017-09-10T06_15_03_457Z-debug.log

  • I tried all the possible solutions found online :

    • running from windows cmd with administrator access,

    • npm cache clean

    • closed my text editor

    • restarted my PC

Please do help me solve this issue.

1

There are 1 answers

0
Ben Croughs On

i also had issues on my mac, but maybe here are some hints to help you

  1. goto folder: C:\Users\End User\AppData\Roaming\npm\node_modules (in windows make sure to enable all folders)
  2. move folders @vue and vue-cli to trash (previous versions)
  3. run cmd.exe as administrator !
  4. npm install @vue/cli -g

hopefully this trick will work for you, see Mac OS : Install vue cli does work properly for my answer on the issue with a mac

thx