npm / cli

the package manager for JavaScript
https://docs.npmjs.com/cli/
Other
8.33k stars 3.06k forks source link

error code EPERM error syscall rename .node-gyp.DELETE @tootallnate #4438

Closed sysmat closed 2 years ago

sysmat commented 2 years ago

Is there an existing issue for this?

This issue exists in the latest npm version

Current Behavior

Expected Behavior

Steps To Reproduce

Environment

; userconfig C:\Users\tomaz.npmrc prefix = "C:\Users\tomaz\AppData\Roaming\npm" registry = "https://zelenjak.arnes.si/nexus/repository/ArnesGroupNPM/" strict-ssl = true

; builtin config undefined prefix = "C:\Users\tomaz\AppData\Roaming\npm"

; node bin location = C:\Program Files\nodejs\node.exe ; cwd = C:\Users\tomaz\Documents\NetBeansProjects\GitLab_Arnes\angular-portal-libs ; HOME = C:\Users\tomaz ; "npm config ls -l" to show all defaults.

sysmat commented 2 years ago
sysmat commented 2 years ago
moonstorm86 commented 2 years ago

I'm having the same issue with an older version of node (v8.11.4) and npm (v5.6.0) also with windows and running from root/Admin.

wraithgar commented 2 years ago

https://github.com/npm/cli/issues/4341#issuecomment-1040608101

anjali14 commented 1 year ago

I installed Nodejs version 14.17.0 today on my windows machine. I am still getting following error on running "npm install npm@latest -g"

C:\windows\system32>npm install npm@latest -g npm ERR! code EPERM npm ERR! syscall rename npm ERR! path #C:\Users\xyz\AppData\Roaming\npm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules\@npmcli npm ERR! dest C:\Users\agoyal\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules\@npmcli npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\xyz\AppData\Roaming\npm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules\@npmcli' -> 'C:\Users\xyz\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules\@npmcli' npm ERR! [OperationalError: EPERM: operation not permitted, rename 'C:\Users\xyz\AppData\Roaming\npm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules\@npmcli' -> 'C:\Users\xyz\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules\@npmcli'] { npm ERR! cause: [Error: EPERM: operation not permitted, rename 'C:\Users\xyz\AppData\Roaming\npm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules\@npmcli' -> 'C:\Users\xyz\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules\@npmcli'] { npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'rename', npm ERR! path: 'C:\Users\xyz\AppData\Roaming\npm\node_modules\npm\node_modules\.node-gyp.DELETE\node_modules\@npmcli', npm ERR! dest: 'C:\Users\xyz\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules\@npmcli' npm ERR! }, npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'rename', npm ERR! path: 'C:\Users\xyz\AppData\Roaming\npm\node_modules\npm\node_modules\.node-gyp.DELETE\node_modules\@npmcli', npm ERR! dest: 'C:\Users\xyz\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules\@npmcli', npm ERR! parent: 'npm' 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.

famzila commented 1 year ago

Faced the same issue after updating Angular CLI and the core version globally. I fixed it by, updating nodejs version and npm version and deleting node-module folder as well as launching the npm install in admin cmd mode.

weishao888 commented 1 year ago

i have the same issue,it's waste me 1hours!not solved yet!

andypotato commented 1 year ago

This issue is not fixed yet