React+Redux - Expected the reducer to be a function
<p>I'm trying to implement redux in my universal app, but I've some problems with redux.
I've this configureStore function:</p>

<pre><code>import { createStore, applyMiddleware, compose } from 'redux';
import thunkMiddleware from 'redux-thunk';
import createLogger from 'redux-logger'
import rootReducer from '../reducers/index';
import { routerMiddleware } from 'react-router-redux';

export default function configureStore(history, initialState) {
  const reduxRouterMiddleware = routerMiddleware(history);
  let finalCreateStore;

  if (__DEVELOPMENT__ &amp;&amp; __CLIENT__ &amp;&amp; __DEVTOOLS__) {
    const { persistState } = require('redux-devtools');
    const DevTools = require('../containers/DevTools/DevTools');

    finalCreateStore = compose(
      applyMiddleware(thunkMiddleware)(createStore),
      window.devToolsExtension ? window.devToolsExtension() : DevTools.instrument(),
      persistState(window.location.href.match(/[?&amp;]debug_session=([^&amp;]+)\b/))
    )(createStore);
  }
  else {
    finalCreateStore = applyMiddleware(thunkMiddleware)(createStore);
  }

  const store = finalCreateStore(rootReducer, initialState);

  if (__DEVELOPMENT__ &amp;&amp; module.hot) {
    module.hot.accept(rootReducer, () =&gt; {
      store.replaceReducer(rootReducer);
    });
  }

  return store;
}
</code></pre>

<p>And then I've my rootReducer file that looks like this:</p>

<pre><code>import { combineReducers } from 'redux';
import environment from './environment';
import general from './general';
import alert from './alert';
import user from './user';
import { routerReducer } from 'react-router-redux'


const rootReducer = combineReducers({
  environment,
  general,
  alert,
  user,
  routing: routerReducer
});

export default rootReducer;
</code></pre>

<p>The problem is that I get this error: Expected the reducer to be a function.
I've googled and searched on StackOverflow(where there are some similar problems), but the answers doesn't works in my case.</p>

<p>So, what I'm doing wrong ? and why ?</p>

<p>Thanks.</p>