{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/13939","repository_url":"https://api.github.com/repos/npm/npm","labels_url":"https://api.github.com/repos/npm/npm/issues/13939/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/13939/comments","events_url":"https://api.github.com/repos/npm/npm/issues/13939/events","html_url":"https://github.com/npm/npm/issues/13939","id":176407684,"number":13939,"title":"npm install checking for presence of tarball content","user":{"login":"wordswords","id":879966,"avatar_url":"https://avatars.githubusercontent.com/u/879966?v=3","gravatar_id":"","url":"https://api.github.com/users/wordswords","html_url":"https://github.com/wordswords","followers_url":"https://api.github.com/users/wordswords/followers","following_url":"https://api.github.com/users/wordswords/following{/other_user}","gists_url":"https://api.github.com/users/wordswords/gists{/gist_id}","starred_url":"https://api.github.com/users/wordswords/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordswords/subscriptions","organizations_url":"https://api.github.com/users/wordswords/orgs","repos_url":"https://api.github.com/users/wordswords/repos","events_url":"https://api.github.com/users/wordswords/events{/privacy}","received_events_url":"https://api.github.com/users/wordswords/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-12T15:34:24Z","updated_at":"2016-09-13T14:59:10Z","closed_at":null,"body":"#### What's the feature?\r\n\r\nAdd tarball checking for npm install.\r\n\r\n#### What problem is the feature intended to solve?\r\n\r\nWhen you have a file with the same name as the node module you're trying to install, in the root directory of your application, and run 'npm install <module in repository> -g', npm treats that file as a tarball file and tries to install it, instead of the npm module from the repository. I think this is confusing for beginners and could be differentiated better in the error message, which fails with a ENOENT can't find package.json' error. \r\n\r\nIt could be made easier by checking if the file is in fact a tarball before decompressing, and if it is not, and is a file instead of a directory, then it could throw a warning.\r\n\r\n#### Is the absence of this feature blocking you or your team? If so, how?\r\n\r\nNo\r\n\r\n#### Is this feature similar to an existing feature in another tool?\r\n\r\nYes\r\n\r\n#### Is this a feature you're prepared to implement, with support from the npm CLI team?\r\n\r\nUnfortunately I'm not able to.\r\n"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/246710459","html_url":"https://github.com/npm/npm/issues/13939#issuecomment-246710459","issue_url":"https://api.github.com/repos/npm/npm/issues/13939","id":246710459,"user":{"login":"wordswords","id":879966,"avatar_url":"https://avatars.githubusercontent.com/u/879966?v=3","gravatar_id":"","url":"https://api.github.com/users/wordswords","html_url":"https://github.com/wordswords","followers_url":"https://api.github.com/users/wordswords/followers","following_url":"https://api.github.com/users/wordswords/following{/other_user}","gists_url":"https://api.github.com/users/wordswords/gists{/gist_id}","starred_url":"https://api.github.com/users/wordswords/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordswords/subscriptions","organizations_url":"https://api.github.com/users/wordswords/orgs","repos_url":"https://api.github.com/users/wordswords/repos","events_url":"https://api.github.com/users/wordswords/events{/privacy}","received_events_url":"https://api.github.com/users/wordswords/received_events","type":"User","site_admin":false},"created_at":"2016-09-13T14:59:10Z","updated_at":"2016-09-13T14:59:10Z","body":"9 times out of 10 you want to install a remote module anyway, and if there is a local file with the same name then it should take that into account. Either with a more friendly error message that says something along the lines of 'we tried to install the local file, that turned out not to be a npm package, and it's preventing us fetching a remote module, have you tried removing it and installing a remote module' or as you said, automatically reaching for that remote module if the local file turns out not to be a valid package."}}
{"actor":{"display_login":"wordswords"}}