{"action":"opened","issue":{"url":"https://api.github.com/repos/npm/npm/issues/8284","labels_url":"https://api.github.com/repos/npm/npm/issues/8284/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/8284/comments","events_url":"https://api.github.com/repos/npm/npm/issues/8284/events","html_url":"https://github.com/npm/npm/issues/8284","id":76776993,"number":8284,"title":"`npm install -g pkg` will install version in $PWD/pkg/package.json globally","user":{"login":"secrettriangle","id":1765130,"avatar_url":"https://avatars.githubusercontent.com/u/1765130?v=3","gravatar_id":"","url":"https://api.github.com/users/secrettriangle","html_url":"https://github.com/secrettriangle","followers_url":"https://api.github.com/users/secrettriangle/followers","following_url":"https://api.github.com/users/secrettriangle/following{/other_user}","gists_url":"https://api.github.com/users/secrettriangle/gists{/gist_id}","starred_url":"https://api.github.com/users/secrettriangle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/secrettriangle/subscriptions","organizations_url":"https://api.github.com/users/secrettriangle/orgs","repos_url":"https://api.github.com/users/secrettriangle/repos","events_url":"https://api.github.com/users/secrettriangle/events{/privacy}","received_events_url":"https://api.github.com/users/secrettriangle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-15T16:19:32Z","updated_at":"2015-05-15T16:19:32Z","closed_at":null,"body":"Even if you use something like `npm install -g pkg@latest`, if there's a `$PWD/pkg@latest/package.json` file, it will use that.\r\n\r\nThis makes npm unreliable as a package manager for global packages.\r\n\r\nMaybe we should consider prioritizing remote packages over local paths when using `-g`?"}}