{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/278","labels_url":"https://api.github.com/repos/facebook/flow/issues/278/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/278/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/278/events","html_url":"https://github.com/facebook/flow/issues/278","id":58769720,"number":278,"title":"Fails to resolve main property in package.json","user":{"login":"Dignifiedquire","id":790842,"avatar_url":"https://avatars.githubusercontent.com/u/790842?v=3","gravatar_id":"","url":"https://api.github.com/users/Dignifiedquire","html_url":"https://github.com/Dignifiedquire","followers_url":"https://api.github.com/users/Dignifiedquire/followers","following_url":"https://api.github.com/users/Dignifiedquire/following{/other_user}","gists_url":"https://api.github.com/users/Dignifiedquire/gists{/gist_id}","starred_url":"https://api.github.com/users/Dignifiedquire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dignifiedquire/subscriptions","organizations_url":"https://api.github.com/users/Dignifiedquire/orgs","repos_url":"https://api.github.com/users/Dignifiedquire/repos","events_url":"https://api.github.com/users/Dignifiedquire/events{/privacy}","received_events_url":"https://api.github.com/users/Dignifiedquire/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-24T17:11:11Z","updated_at":"2015-02-24T19:27:05Z","closed_at":null,"body":"\r\nIf I have a file with \r\n```js\r\n/* @flow */\r\nvar ReactRouter = require('react-router');\r\n```\r\nflow will fail with:\r\n\r\n```\r\npath/to/file:2 lib\r\nRequired module not found\r\n```\r\n\r\nChanging the `main` property from `lib` in the package.json of react-router to be `lib/index` makes it work.\r\n\r\n* `flow@0.4.0`\r\n* `react-router@0.12.2`\r\n\r\nref: https://github.com/facebook/flow/issues/46\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/75827012","html_url":"https://github.com/facebook/flow/issues/278#issuecomment-75827012","issue_url":"https://api.github.com/repos/facebook/flow/issues/278","id":75827012,"user":{"login":"mjackson","id":92839,"avatar_url":"https://avatars.githubusercontent.com/u/92839?v=3","gravatar_id":"","url":"https://api.github.com/users/mjackson","html_url":"https://github.com/mjackson","followers_url":"https://api.github.com/users/mjackson/followers","following_url":"https://api.github.com/users/mjackson/following{/other_user}","gists_url":"https://api.github.com/users/mjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/mjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjackson/subscriptions","organizations_url":"https://api.github.com/users/mjackson/orgs","repos_url":"https://api.github.com/users/mjackson/repos","events_url":"https://api.github.com/users/mjackson/events{/privacy}","received_events_url":"https://api.github.com/users/mjackson/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T19:27:05Z","updated_at":"2015-02-24T19:27:05Z","body":"What is the underlying issue here? Seems like flow doesn't understand node/npm's `index.js` convention."}}