{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/11977","repository_url":"https://api.github.com/repos/npm/npm","labels_url":"https://api.github.com/repos/npm/npm/issues/11977/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/11977/comments","events_url":"https://api.github.com/repos/npm/npm/issues/11977/events","html_url":"https://github.com/npm/npm/issues/11977","id":142105475,"number":11977,"title":"Fixing npm permissions when following docs doesn't work","user":{"login":"thedamon","id":1375267,"avatar_url":"https://avatars.githubusercontent.com/u/1375267?v=3","gravatar_id":"","url":"https://api.github.com/users/thedamon","html_url":"https://github.com/thedamon","followers_url":"https://api.github.com/users/thedamon/followers","following_url":"https://api.github.com/users/thedamon/following{/other_user}","gists_url":"https://api.github.com/users/thedamon/gists{/gist_id}","starred_url":"https://api.github.com/users/thedamon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thedamon/subscriptions","organizations_url":"https://api.github.com/users/thedamon/orgs","repos_url":"https://api.github.com/users/thedamon/repos","events_url":"https://api.github.com/users/thedamon/events{/privacy}","received_events_url":"https://api.github.com/users/thedamon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/npm/npm/labels/support","name":"support","color":"000000"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-19T22:06:31Z","updated_at":"2016-03-22T01:05:53Z","closed_at":"2016-03-22T01:05:53Z","body":"I followed the instructions at https://docs.npmjs.com/getting-started/fixing-npm-permissions to try and stop having to sudo to do installs. \r\n\r\nMy `npm config get prefix` is  `/Users/l392044/.npm-packages`\r\n\r\nI ran `sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}`\r\n\r\nThen I tried the test `npm install -g jshint` and got \r\n\r\n```\r\nnpm WARN locking Error: EACCES: permission denied, open '/Users/l392044/.npm/_locks/jshint-aa957a274ecf99a5.lock'\r\nnpm WARN locking     at Error (native)\r\nnpm WARN locking  /Users/l392044/.npm/_locks/jshint-aa957a274ecf99a5.lock failed { [Error: EACCES: permission denied, open '/Users/l392044/.npm/_locks/jshint-aa957a274ecf99a5.lock']\r\nnpm WARN locking   errno: -13,\r\nnpm WARN locking   code: 'EACCES',\r\nnpm WARN locking   syscall: 'open',\r\nnpm WARN locking   path: '/Users/l392044/.npm/_locks/jshint-aa957a274ecf99a5.lock' }\r\nnpm ERR! Darwin 15.3.0\r\nnpm ERR! argv \"/usr/local/bin/node\" \"/Users/l392044/.npm-packages/bin/npm\" \"install\" \"-g\" \"jshint\"\r\nnpm ERR! node v4.0.0\r\nnpm ERR! npm  v2.11.2\r\n\r\nnpm ERR! Attempt to unlock /Users/l392044/.npm-packages/lib/node_modules/jshint, which hasn't been locked\r\n```\r\n\r\nmy `~/npm-debug.log` doesn't exist. which i guess is related to the permissions issue.\r\n\r\nI tried following steps 2-4 and still had pretty much the same problem, with identical error message except updated path in `Attempt to unlock /Users/l392044/.npm-global/lib/node_modules/jshint, which hasn't been locked`.\r\n\r\nWondering what else to try :|"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/199567975","html_url":"https://github.com/npm/npm/issues/11977#issuecomment-199567975","issue_url":"https://api.github.com/repos/npm/npm/issues/11977","id":199567975,"user":{"login":"thedamon","id":1375267,"avatar_url":"https://avatars.githubusercontent.com/u/1375267?v=3","gravatar_id":"","url":"https://api.github.com/users/thedamon","html_url":"https://github.com/thedamon","followers_url":"https://api.github.com/users/thedamon/followers","following_url":"https://api.github.com/users/thedamon/following{/other_user}","gists_url":"https://api.github.com/users/thedamon/gists{/gist_id}","starred_url":"https://api.github.com/users/thedamon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thedamon/subscriptions","organizations_url":"https://api.github.com/users/thedamon/orgs","repos_url":"https://api.github.com/users/thedamon/repos","events_url":"https://api.github.com/users/thedamon/events{/privacy}","received_events_url":"https://api.github.com/users/thedamon/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T01:05:53Z","updated_at":"2016-03-22T01:05:53Z","body":"@zkat WOO! months of latent annoyance as i fail to deal with this have been solved. thank you! :)"}}