{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/1621","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/1621/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/1621/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/1621/events","html_url":"https://github.com/facebook/flow/pull/1621","id":145679339,"number":1621,"title":"[doc] Fix CSSModule example documentation","user":{"login":"MoOx","id":157534,"avatar_url":"https://avatars.githubusercontent.com/u/157534?v=3","gravatar_id":"","url":"https://api.github.com/users/MoOx","html_url":"https://github.com/MoOx","followers_url":"https://api.github.com/users/MoOx/followers","following_url":"https://api.github.com/users/MoOx/following{/other_user}","gists_url":"https://api.github.com/users/MoOx/gists{/gist_id}","starred_url":"https://api.github.com/users/MoOx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoOx/subscriptions","organizations_url":"https://api.github.com/users/MoOx/orgs","repos_url":"https://api.github.com/users/MoOx/repos","events_url":"https://api.github.com/users/MoOx/events{/privacy}","received_events_url":"https://api.github.com/users/MoOx/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/flow/labels/CLA%20Signed","name":"CLA Signed","color":"eeeeee"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-04T13:08:11Z","updated_at":"2016-04-04T16:58:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/flow/pulls/1621","html_url":"https://github.com/facebook/flow/pull/1621","diff_url":"https://github.com/facebook/flow/pull/1621.diff","patch_url":"https://github.com/facebook/flow/pull/1621.patch"},"body":"Currently, the documentation is not enough, or not clear.\r\n\r\nBy following it, I (and I think [I am](http://stackoverflow.com/questions/34921185/required-module-not-found-for-module-that-exists-in-node-modules) [not](https://github.com/facebook/flow/issues/51#issuecomment-143923503) [alone](https://gist.github.com/lambdahands/d19e0da96285b749f0ef)) get a `Required module not found` error for css file references.\r\n\r\nExample\r\n\r\n```\r\nweb_modules/ReactFunction/index.js:4\r\n  4: import styles from \"./index.css\"\r\n                        ^^^^^^^^^^^^^ ./index.css. Required module not found\r\n```\r\n\r\nI just following this gist https://gist.github.com/lambdahands/d19e0da96285b749f0ef#gistcomment-1703455 to find a solution.\r\n\r\nI am new to flow so this workaround is probably bad, but I wanted to start a discussion about it, since [no issue is opened about cssmodule](https://github.com/facebook/flow/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+cssmodule)."},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/205392069","html_url":"https://github.com/facebook/flow/pull/1621#issuecomment-205392069","issue_url":"https://api.github.com/repos/facebook/flow/issues/1621","id":205392069,"user":{"login":"gabelevi","id":1887264,"avatar_url":"https://avatars.githubusercontent.com/u/1887264?v=3","gravatar_id":"","url":"https://api.github.com/users/gabelevi","html_url":"https://github.com/gabelevi","followers_url":"https://api.github.com/users/gabelevi/followers","following_url":"https://api.github.com/users/gabelevi/following{/other_user}","gists_url":"https://api.github.com/users/gabelevi/gists{/gist_id}","starred_url":"https://api.github.com/users/gabelevi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabelevi/subscriptions","organizations_url":"https://api.github.com/users/gabelevi/orgs","repos_url":"https://api.github.com/users/gabelevi/repos","events_url":"https://api.github.com/users/gabelevi/events{/privacy}","received_events_url":"https://api.github.com/users/gabelevi/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T16:58:26Z","updated_at":"2016-04-04T16:58:26Z","body":"Hi @MoOx, thanks for the PR! So I tried the example from the docs verbatim and it seemed to work for me with Flow v0.22.0. In theory setting `module.system=haste` shouldn't be necessary.\r\n\r\nWhen I look at the issue you linked, I notice that it was closed in favor of https://github.com/facebook/flow/issues/1322, which does highlight an bug with `module.name_mapper`. Looking into it a little more, I'm seeing another bug if `CSSModule.js.flow` is in the `[libs]` section.\r\n\r\nCould you post a gist of your `.flowconfig`? If you do then I may be able to help figure out what's going wrong. But changing the module system should be orthogonal."}}