Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: _redux.compose.apply(...) is not a function #148

Open
karlos1337 opened this issue Aug 10, 2017 · 4 comments
Open

TypeError: _redux.compose.apply(...) is not a function #148

karlos1337 opened this issue Aug 10, 2017 · 4 comments

Comments

@karlos1337
Copy link

karlos1337 commented Aug 10, 2017

Hi all,
I'm implementing ng-redux in an old project, all works fine in development but all karma tests fails with the message:

TypeError: _redux.compose.apply(...) is not a function

May I need to add something to karma.conf?

@guysenpai
Copy link

I have the same issue.

@guysenpai
Copy link

is there someone here who has resolved this issue or has a solution for that?

@deini
Copy link
Collaborator

deini commented Sep 1, 2017

@karlos1337 @guysenpai Can either of you guys create a repo reproducing this so we can take a look?

@gthmb
Copy link

gthmb commented Nov 29, 2017

@karlos1337 @guysenpai For what it's worth, we had the same issue in our project, and it ended up being an problem with the redux dev tools not being available in the headless browser that karma was using.

We fixed it by conditionally checking if the redux tools were available before trying to pass them to $ngReduxProvider.createStoreWith.

Example:

const reduxDevTools:Function = _.get(window, '__REDUX_DEVTOOLS_EXTENSION__');
const enhancers = reduxDevTools ? [reduxDevTools()] : null;
const reduxBootstrap = $ngReduxProvider => {
    $ngReduxProvider.createStoreWith(reducer, [thunk], enhancers);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants