{"action":"opened","issue":{"url":"https://api.github.com/repos/npm/npm/issues/10604","labels_url":"https://api.github.com/repos/npm/npm/issues/10604/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/10604/comments","events_url":"https://api.github.com/repos/npm/npm/issues/10604/events","html_url":"https://github.com/npm/npm/issues/10604","id":119378508,"number":10604,"title":"npm publish from Windows produces bad bin path","user":{"login":"jedmao","id":1058243,"avatar_url":"https://avatars.githubusercontent.com/u/1058243?v=3","gravatar_id":"","url":"https://api.github.com/users/jedmao","html_url":"https://github.com/jedmao","followers_url":"https://api.github.com/users/jedmao/followers","following_url":"https://api.github.com/users/jedmao/following{/other_user}","gists_url":"https://api.github.com/users/jedmao/gists{/gist_id}","starred_url":"https://api.github.com/users/jedmao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedmao/subscriptions","organizations_url":"https://api.github.com/users/jedmao/orgs","repos_url":"https://api.github.com/users/jedmao/repos","events_url":"https://api.github.com/users/jedmao/events{/privacy}","received_events_url":"https://api.github.com/users/jedmao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-29T19:01:02Z","updated_at":"2015-11-29T19:01:02Z","closed_at":null,"body":"Running the `npm publish` command from Windows in a project that does not explicitly define a `bin` path in the package.json file automatically produces a `bin` path in the format:\r\n\r\n```json\r\n\"bin\": {\r\n  \"foo\": \"bin\\\\foo\"\r\n}\r\n```\r\nThis causes installation to fail on *nix systems:\r\n\r\n```\r\n$ npm install -g foo\r\nnpm ERR! Darwin 15.0.0\r\nnpm ERR! argv \"/Users/xxx/.nvm/versions/v0.12.5/bin/node\" \"/Users/xxx/.nvm/versions/v0.12.5/bin/npm\" \"install\" \"-g\" \"foo\"\r\n\r\nnpm ERR! enoent ENOENT, chmod '/Users/xxx/.nvm/versions/v0.12.5/lib/node_modules/foo/bin\\foo\r\n```\r\n\r\n\r\nSee https://github.com/editorconfig/editorconfig-core-js/issues/29#issuecomment-160422157"}}