{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/10938","labels_url":"https://api.github.com/repos/npm/npm/issues/10938/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/10938/comments","events_url":"https://api.github.com/repos/npm/npm/issues/10938/events","html_url":"https://github.com/npm/npm/issues/10938","id":123633966,"number":10938,"title":"Empty .bin directories are not removed and result in ENOENT errors","user":{"login":"SystemParadox","id":1228777,"avatar_url":"https://avatars.githubusercontent.com/u/1228777?v=3","gravatar_id":"","url":"https://api.github.com/users/SystemParadox","html_url":"https://github.com/SystemParadox","followers_url":"https://api.github.com/users/SystemParadox/followers","following_url":"https://api.github.com/users/SystemParadox/following{/other_user}","gists_url":"https://api.github.com/users/SystemParadox/gists{/gist_id}","starred_url":"https://api.github.com/users/SystemParadox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SystemParadox/subscriptions","organizations_url":"https://api.github.com/users/SystemParadox/orgs","repos_url":"https://api.github.com/users/SystemParadox/repos","events_url":"https://api.github.com/users/SystemParadox/events{/privacy}","received_events_url":"https://api.github.com/users/SystemParadox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-23T10:15:51Z","updated_at":"2016-01-16T10:45:01Z","closed_at":null,"body":"With npm@3 I am regularly getting ENOENT errors.\r\n\r\nWhen doing `npm remove` and seemingly also when doing `npm install` (perhaps because npm is moving things around in the tree?), I end up with empty `.bin` directories like this:\r\n\r\n```\r\nnode_modules/foobar/node_modules/.bin\r\n```\r\n\r\nWhere foobar and everything under it is empty, but the .bin wasn't removed. Any other `npm install` then reports ENOENT for `node_modules/foobar/package.json` (as per #10471).\r\n\r\nRemoving all the empty directories fixes it:\r\n\r\n```\r\nrmdir node_modules/foobar/node_modules/.bin\r\nrmdir node_modules/foobar/node_modules/\r\nrmdir node_modules/foobar\r\n```\r\n\r\nExpected behaviour: npm should have removed these directories already.\r\n\r\nnpm version 3.5.3\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/172182296","html_url":"https://github.com/npm/npm/issues/10938#issuecomment-172182296","issue_url":"https://api.github.com/repos/npm/npm/issues/10938","id":172182296,"user":{"login":"chrisirhc","id":132584,"avatar_url":"https://avatars.githubusercontent.com/u/132584?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisirhc","html_url":"https://github.com/chrisirhc","followers_url":"https://api.github.com/users/chrisirhc/followers","following_url":"https://api.github.com/users/chrisirhc/following{/other_user}","gists_url":"https://api.github.com/users/chrisirhc/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisirhc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisirhc/subscriptions","organizations_url":"https://api.github.com/users/chrisirhc/orgs","repos_url":"https://api.github.com/users/chrisirhc/repos","events_url":"https://api.github.com/users/chrisirhc/events{/privacy}","received_events_url":"https://api.github.com/users/chrisirhc/received_events","type":"User","site_admin":false},"created_at":"2016-01-16T10:45:01Z","updated_at":"2016-01-16T10:45:01Z","body":"Likely related/same as #10887"}}