{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/4578","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/4578/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/4578/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/4578/events","html_url":"https://github.com/Microsoft/vscode/issues/4578","id":142744439,"number":4578,"title":"Locking files in node_modules","user":{"login":"unional","id":3254987,"avatar_url":"https://avatars.githubusercontent.com/u/3254987?v=3","gravatar_id":"","url":"https://api.github.com/users/unional","html_url":"https://github.com/unional","followers_url":"https://api.github.com/users/unional/followers","following_url":"https://api.github.com/users/unional/following{/other_user}","gists_url":"https://api.github.com/users/unional/gists{/gist_id}","starred_url":"https://api.github.com/users/unional/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unional/subscriptions","organizations_url":"https://api.github.com/users/unional/orgs","repos_url":"https://api.github.com/users/unional/repos","events_url":"https://api.github.com/users/unional/events{/privacy}","received_events_url":"https://api.github.com/users/unional/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/vscode/labels/bug","name":"bug","color":"E57E7E"},{"url":"https://api.github.com/repos/Microsoft/vscode/labels/important","name":"important","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"dbaeumer","id":1931590,"avatar_url":"https://avatars.githubusercontent.com/u/1931590?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaeumer","html_url":"https://github.com/dbaeumer","followers_url":"https://api.github.com/users/dbaeumer/followers","following_url":"https://api.github.com/users/dbaeumer/following{/other_user}","gists_url":"https://api.github.com/users/dbaeumer/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaeumer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaeumer/subscriptions","organizations_url":"https://api.github.com/users/dbaeumer/orgs","repos_url":"https://api.github.com/users/dbaeumer/repos","events_url":"https://api.github.com/users/dbaeumer/events{/privacy}","received_events_url":"https://api.github.com/users/dbaeumer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Microsoft/vscode/milestones/14","html_url":"https://github.com/Microsoft/vscode/milestones/April%202016","labels_url":"https://api.github.com/repos/Microsoft/vscode/milestones/14/labels","id":1634573,"number":14,"title":"April 2016","description":"","creator":{"login":"joaomoreno","id":22350,"avatar_url":"https://avatars.githubusercontent.com/u/22350?v=3","gravatar_id":"","url":"https://api.github.com/users/joaomoreno","html_url":"https://github.com/joaomoreno","followers_url":"https://api.github.com/users/joaomoreno/followers","following_url":"https://api.github.com/users/joaomoreno/following{/other_user}","gists_url":"https://api.github.com/users/joaomoreno/gists{/gist_id}","starred_url":"https://api.github.com/users/joaomoreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaomoreno/subscriptions","organizations_url":"https://api.github.com/users/joaomoreno/orgs","repos_url":"https://api.github.com/users/joaomoreno/repos","events_url":"https://api.github.com/users/joaomoreno/events{/privacy}","received_events_url":"https://api.github.com/users/joaomoreno/received_events","type":"User","site_admin":false},"open_issues":105,"closed_issues":57,"state":"open","created_at":"2016-03-09T15:13:38Z","updated_at":"2016-04-01T10:07:18Z","due_on":"2016-04-30T07:00:00Z","closed_at":null},"comments":21,"created_at":"2016-03-22T18:52:30Z","updated_at":"2016-04-01T11:26:21Z","closed_at":null,"body":"- VSCode Version: 0.10.11\r\n- OS Version: Windows 2012 R2\r\n\r\nSteps to Reproduce:\r\n1. Open project and do some work\r\n2. Update a npm package. e.g. `npm i -D typescript`\r\n\r\nIt errors with:\r\n```sh\r\nnpm ERR! Error: EPERM: operation not permitted, rename 'E:\\hwong\\p4\\projects\\pandash\\node_modules\\typescript' -> 'E:\\hwong\\p4\\projects\\pandash\\node_modules\\.typescript.DELETE'\r\n```\r\n\r\nOnce I close VSCode and retry `npm i -D typescript`, it works fine."},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/comments/204354846","html_url":"https://github.com/Microsoft/vscode/issues/4578#issuecomment-204354846","issue_url":"https://api.github.com/repos/Microsoft/vscode/issues/4578","id":204354846,"user":{"login":"felixfbecker","id":10532611,"avatar_url":"https://avatars.githubusercontent.com/u/10532611?v=3","gravatar_id":"","url":"https://api.github.com/users/felixfbecker","html_url":"https://github.com/felixfbecker","followers_url":"https://api.github.com/users/felixfbecker/followers","following_url":"https://api.github.com/users/felixfbecker/following{/other_user}","gists_url":"https://api.github.com/users/felixfbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfbecker/subscriptions","organizations_url":"https://api.github.com/users/felixfbecker/orgs","repos_url":"https://api.github.com/users/felixfbecker/repos","events_url":"https://api.github.com/users/felixfbecker/events{/privacy}","received_events_url":"https://api.github.com/users/felixfbecker/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T11:26:21Z","updated_at":"2016-04-01T11:26:21Z","body":"Just happened again, I did not open any file in the node_modules directory. I just opened a folder (vscode-node-debug) in VS Code and ran npm install, which failed because of locked files:\r\n```\r\n388 verbose stack Error: EPERM: operation not permitted, rename 'C:\\Users\\felix\\git\\opensource\\vscode-node-debug\\node_modules\\vscode-debugadapter-testsupport' -> 'C:\\Users\\felix\\git\\opensource\\vscode-node-debug\\node_modules\\.vscode-debugadapter-testsupport.DELETE'\r\n388 verbose stack     at moveAway (C:\\Program Files\\NodeJS\\latest\\node_modules\\npm\\lib\\install\\action\\finalize.js:38:5)\r\n388 verbose stack     at destStatted (C:\\Program Files\\NodeJS\\latest\\node_modules\\npm\\lib\\install\\action\\finalize.js:27:7)\r\n388 verbose stack     at FSReqWrap.oncomplete (fs.js:82:15)\r\n388 verbose stack\r\n388 verbose stack Error: EPERM: operation not permitted, rename 'C:\\Users\\felix\\git\\opensource\\vscode-node-debug\\node_modules\\vscode-debugadapter-testsupport' -> 'C:\\Users\\felix\\git\\opensource\\vscode-node-debug\\node_modules\\.vscode-debugadapter-testsupport.DELETE'\r\n388 verbose stack     at Error (native)\r\n389 verbose cwd C:\\Users\\felix\\git\\opensource\\vscode-node-debug\r\n390 error Windows_NT 10.0.10586\r\n391 error argv \"C:\\\\Program Files\\\\NodeJS\\\\latest\\\\node.exe\" \"C:\\\\Program Files\\\\NodeJS\\\\latest\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js\" \"i\"\r\n392 error node v5.9.0\r\n393 error npm  v3.8.3\r\n394 error path C:\\Users\\felix\\git\\opensource\\vscode-node-debug\\node_modules\\vscode-debugadapter-testsupport\r\n395 error code EPERM\r\n396 error errno -4048\r\n397 error syscall rename\r\n398 error Error: EPERM: operation not permitted, rename 'C:\\Users\\felix\\git\\opensource\\vscode-node-debug\\node_modules\\vscode-debugadapter-testsupport' -> 'C:\\Users\\felix\\git\\opensource\\vscode-node-debug\\node_modules\\.vscode-debugadapter-testsupport.DELETE'\r\n398 error     at moveAway (C:\\Program Files\\NodeJS\\latest\\node_modules\\npm\\lib\\install\\action\\finalize.js:38:5)\r\n398 error     at destStatted (C:\\Program Files\\NodeJS\\latest\\node_modules\\npm\\lib\\install\\action\\finalize.js:27:7)\r\n398 error     at FSReqWrap.oncomplete (fs.js:82:15)\r\n398 error\r\n398 error Error: EPERM: operation not permitted, rename 'C:\\Users\\felix\\git\\opensource\\vscode-node-debug\\node_modules\\vscode-debugadapter-testsupport' -> 'C:\\Users\\felix\\git\\opensource\\vscode-node-debug\\node_modules\\.vscode-debugadapter-testsupport.DELETE'\r\n398 error     at Error (native)\r\n398 error  { [Error: EPERM: operation not permitted, rename 'C:\\Users\\felix\\git\\opensource\\vscode-node-debug\\node_modules\\vscode-debugadapter-testsupport' -> 'C:\\Users\\felix\\git\\opensource\\vscode-node-debug\\node_modules\\.vscode-debugadapter-testsupport.DELETE'] parent: 'node-debug' }\r\n399 error Please try running this command again as root/Administrator.\r\n400 verbose exit [ -4048, true ]\r\n```"}}