0

I am using redux-observable in Ionic2 rc0 and getting below error, any idea?

Error: Module /Volumes/data/test/node_modules/redux-observable/lib/index.js does not 
export createEpicMiddleware (imported by /Volumes/data/test/.tmp/store/index.js)
Roman
  • 17,008
  • 3
  • 36
  • 49
Kamran Qadri
  • 144
  • 6

1 Answers1

0

I haven't used Ionic in years, but a quick look at the Ionic issue tracker suggests this is related to Rollup and affects numerous third party libraries.

ionic#8322 contains numerous examples of this problem, and looks like it then moved to ionic-app-scripts#68 with the latest conclusions appearing to be here

If you find there's something on redux-observable's end we can do to make it easier, please let us know! We do maintain a TypeScript definition included with the package.

As a temporary workaround you might be able to access the file directly with:

import { createEpicMiddleware } from 'redux-observable/lib/createEpicMiddleware';

// note the path! reaching into lib directly

It might not work though, because I doubt TypeScript will correlate this file with the type definition in our index.d.ts.

jayphelps
  • 15,276
  • 3
  • 41
  • 54