{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/10826","repository_url":"https://api.github.com/repos/npm/npm","labels_url":"https://api.github.com/repos/npm/npm/issues/10826/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/10826/comments","events_url":"https://api.github.com/repos/npm/npm/issues/10826/events","html_url":"https://github.com/npm/npm/issues/10826","id":122265957,"number":10826,"title":"npm install fails on Windows: \"Error: EPERM: operation not permitted, rename\"","user":{"login":"barbalex","id":669783,"avatar_url":"https://avatars1.githubusercontent.com/u/669783?v=3","gravatar_id":"","url":"https://api.github.com/users/barbalex","html_url":"https://github.com/barbalex","followers_url":"https://api.github.com/users/barbalex/followers","following_url":"https://api.github.com/users/barbalex/following{/other_user}","gists_url":"https://api.github.com/users/barbalex/gists{/gist_id}","starred_url":"https://api.github.com/users/barbalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barbalex/subscriptions","organizations_url":"https://api.github.com/users/barbalex/orgs","repos_url":"https://api.github.com/users/barbalex/repos","events_url":"https://api.github.com/users/barbalex/events{/privacy}","received_events_url":"https://api.github.com/users/barbalex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":60,"created_at":"2015-12-15T12:51:22Z","updated_at":"2017-03-20T08:58:27Z","closed_at":"2015-12-16T14:31:30Z","body":"I work on Windows 10, up to date installation.\n`npm i` runs in powershell\nnode v5.2.0\nnpm v3.3.12\n\nThis error occures every time. I have repeated 5 times, deleting the node_modules folder beforehand.\nI have also run it twice as administrator.\nIt works on my OsX notebook.\n\nHere the error message in powershell:\n\n```\nnpm WARN EPACKAGEJSON ae@1.0.0 No repository field.\nnpm ERR! Windows_NT 10.0.10586\nnpm ERR! argv \"C:\\\\Program Files\\\\nodejs\\\\node.exe\" \"C:\\\\Program Files\\\\nodejs\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js\" \"i\"\nnpm ERR! node v5.2.0\nnpm ERR! npm  v3.3.12\nnpm ERR! path C:\\Users\\alex\\ae\\node_modules\\.staging\\escope-b5ac5ca528edb372dbff854e4a2941fb\nnpm ERR! code EPERM\nnpm ERR! errno -4048\nnpm ERR! syscall rename\n\nnpm ERR! Error: EPERM: operation not permitted, rename 'C:\\Users\\alex\\ae\\node_modules\\.staging\\escope-b5ac5ca528edb372db\nff854e4a2941fb' -> 'C:\\Users\\alex\\ae\\node_modules\\escope'\nnpm ERR!     at Error (native)\nnpm ERR!  { [Error: EPERM: operation not permitted, rename 'C:\\Users\\alex\\ae\\node_modules\\.staging\\escope-b5ac5ca528edb3\n72dbff854e4a2941fb' -> 'C:\\Users\\alex\\ae\\node_modules\\escope']\nnpm ERR!   errno: -4048,\nnpm ERR!   code: 'EPERM',\nnpm ERR!   syscall: 'rename',\nnpm ERR!   path: 'C:\\\\Users\\\\alex\\\\ae\\\\node_modules\\\\.staging\\\\escope-b5ac5ca528edb372dbff854e4a2941fb',\nnpm ERR!   dest: 'C:\\\\Users\\\\alex\\\\ae\\\\node_modules\\\\escope',\nnpm ERR!   parent: 'ae' }\nnpm ERR!\nnpm ERR! Please try running this command again as root/Administrator.\n\nnpm ERR! Please include the following file with any support request:\nnpm ERR!     C:\\Users\\alex\\ae\\npm-debug.log\n```\n\nThis is the complete log from npm-debug.log: https://gist.github.com/barbalex/da6100299bf5b76f19c2\n\nThis is the project: https://github.com/barbalex/ae\nThis is package.json: https://github.com/barbalex/ae/blob/master/package.json\n"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/287704183","html_url":"https://github.com/npm/npm/issues/10826#issuecomment-287704183","issue_url":"https://api.github.com/repos/npm/npm/issues/10826","id":287704183,"user":{"login":"johntemyra","id":12104833,"avatar_url":"https://avatars0.githubusercontent.com/u/12104833?v=3","gravatar_id":"","url":"https://api.github.com/users/johntemyra","html_url":"https://github.com/johntemyra","followers_url":"https://api.github.com/users/johntemyra/followers","following_url":"https://api.github.com/users/johntemyra/following{/other_user}","gists_url":"https://api.github.com/users/johntemyra/gists{/gist_id}","starred_url":"https://api.github.com/users/johntemyra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johntemyra/subscriptions","organizations_url":"https://api.github.com/users/johntemyra/orgs","repos_url":"https://api.github.com/users/johntemyra/repos","events_url":"https://api.github.com/users/johntemyra/events{/privacy}","received_events_url":"https://api.github.com/users/johntemyra/received_events","type":"User","site_admin":false},"created_at":"2017-03-20T08:58:27Z","updated_at":"2017-03-20T08:58:27Z","body":"I struggled with this error message when I tried to install packages with npm. During this struggle I tried the following with no success:\r\n1. running command as administrator\r\n2. npm cache clear\r\n3. moving the npm folder and  npm-cache folder location to c:/ in order to reduce the paths length\r\n4. Setting folder permissions\r\n5. Removing the node_modules folder\r\n5. Sometimes after a reboot of the computer I was able to install one or two packages but the error persisted.\r\n\r\nWhat finally solved my problem was when I **installed npm-junction**! (as suggested here [https://github.com/npm/npm/issues/3861](url))"}}
{"actor":{"display_login":"johntemyra"}}