Flow-typed: [redux-devtools-extension_v2.x.x.js] Getting error: compose

Created on 2 Aug 2017  路  1Comment  路  Source: flow-typed/flow-typed

Hi!
I have installed libdefs for _redux-devtools-extension_v2.x.x.js_ and _ramda_v0.x.x.js_.
However, when I import compose from ramda:

import { compose } from 'ramda';

I get flow error:

Named import from module ramda. This module has no named export called compose. Did you mean Compose?

If I remove libdef for _redux-devtools-extension_v2.x.x.js_ all is well.
I suppose that _redux-devtools-extension_v2.x.x.js_ sets the type of compose as global (but the function compose in these modules is different).

_flow-bin_ version: 0.51.1
_flow-typed_ version: 2.1.5

bug libdef

Most helpful comment

I'm also running into this error. From what you've explained, it sounds like the issue is with the redux-devtools-extension libdef.

I don't know why, but replacing the line import typeof { compose } from 'redux'; here with import typeof { compose as reduxCompose } from redux; and replacing compose with composeRedux here seems to fix the error.

Does this seem like an appropriate fix?

>All comments

I'm also running into this error. From what you've explained, it sounds like the issue is with the redux-devtools-extension libdef.

I don't know why, but replacing the line import typeof { compose } from 'redux'; here with import typeof { compose as reduxCompose } from redux; and replacing compose with composeRedux here seems to fix the error.

Does this seem like an appropriate fix?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DullReferenceException picture DullReferenceException  路  4Comments

pascalduez picture pascalduez  路  3Comments

NotTooReact89 picture NotTooReact89  路  4Comments

callumlocke picture callumlocke  路  4Comments

lematt1991 picture lematt1991  路  3Comments