azzaze
azzaze

Reputation: 151

Npm update - npm ERR! syscall rename

in my project, I want to make a npm update, but I've always this kind of error :

npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path C:\Users\user\Desktop\SylviaTest\node_modules\bootswatch
npm ERR! dest C:\Users\user\Desktop\SylviaTest\node_modules\.bootswatch-9Qtq80Xi
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\user\Desktop\SylviaTest\node_modules\bootswatch' -> 'C:\Users\user\Desktop\SylviaTest\node_modules\.bootswatch-9Qtq80Xi'
npm ERR!  [Error: EPERM: operation not permitted, rename 'C:\Users\user\Desktop\SylviaTest\node_modules\bootswatch' -> 'C:\Users\user\Desktop\SylviaTest\node_modules\.bootswatch-9Qtq80Xi
'] {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'rename',
npm ERR!   path: 'C:\\Users\\user\\Desktop\\SylviaTest\\node_modules\\bootswatch',
npm ERR!   dest: 'C:\\Users\\user\\Desktop\\SylviaTest\\node_modules\\.bootswatch-9Qtq80Xi'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

I tried :

but always this error... Can someone help me please ?

Upvotes: 2

Views: 6206

Answers (2)

Ahmed Abdelatty
Ahmed Abdelatty

Reputation: 1

I think you could try reinstalling node and npm. It was the only solution that worked for me.

Upvotes: 0

Y H
Y H

Reputation: 642

For anyone else having this issue: make sure there is nothing open that might be using those files.

  • if the project server is running, close it.
  • if you have the project open in an IDE, close it.
  • if you have some of the files open in file explore, close it.

Then try the npm command again.

Upvotes: 6

Related Questions