Flow: Flow can't recognize material UI?

Created on 2 Oct 2018  Â·  3Comments  Â·  Source: facebook/flow

I just installed flow based on "Create React App". I have already successfully installed Material UI but it seems doesn't recognized the module when I tested by "npm run flow".

Error ┈┈┈┈┈┈┈ src/client/components/SequenceEditor/SequenceSidebarPanel.js:6:21

Cannot resolve module @material-ui/core/Divider.

Most helpful comment

It's likely that your node_modules folder is being ignored under the [ignore] group in .flowconfig

All 3 comments

It's likely that your node_modules folder is being ignored under the [ignore] group in .flowconfig

hi @dotku did you resolve your issue?
I think I am running in similar problems and I have the feeling that the problem lies in flow-typed, which creates stubs in this way:

declare module '@material-ui/core/Divider/Divider' {
  declare module.exports: any;
}

declare module '@material-ui/core/Divider/index' {
  declare module.exports: any;
}

note the final /index, so there is not actually any @material-ui/core/Divider...
Maybe I am totally wrong.. I am looking into this
and I think this is a related issue

Like @kuus says this seems to be an issue with flow-typed so makes sense to open the issue there. There's nothing inherent in Flow which means it wouldn't support libdefs for @material-ui

Was this page helpful?
0 / 5 - 0 ratings