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

Troubleshooting browser env. -- getting to work with redux-observables #9

Open
tylerweitzman opened this issue Apr 5, 2019 · 0 comments

Comments

@tylerweitzman
Copy link

My file app.reducer.js looks like this:

import * as Rx from 'rxjs';
import RxFiddle from 'rxfiddle';
import { combineReducers, applyMiddleware, compose, createStore } from 'redux';
import logger from 'redux-logger';
import { createEpicMiddleware } from 'redux-observable';
import { authReducer } from './auth/auth.reducer';
import { messengerReducer } from './messenger/messenger.reducer';
import { modalReducer } from './modals/modal.reducer';
import epic from './app.epic';

new RxFiddle({
    Rx,
}).openWindow();

const reducer = combineReducers({
    auth: authReducer,
    messenger: messengerReducer,
    modal: modalReducer,
});

export const store = createStore(
    reducer,
    compose(applyMiddleware(createEpicMiddleware(epic), ...(process.env.ENV === 'DEV' || process.env.FORCE_DEV) ? [logger] : [])),
);

I get the following error when I run the application:

Uncaught TypeError: Cannot read property 'prototype' of undefined
    at new Instrumentation (rxfiddle.js:446)
    at RxFiddle../node_modules/rxfiddle/rxfiddle.js.RxFiddle.instrumentRx5 (rxfiddle.js:1075)
    at RxFiddle../node_modules/rxfiddle/rxfiddle.js.RxFiddle.subscribe (rxfiddle.js:982)
    at RxFiddle../node_modules/rxfiddle/rxfiddle.js.RxFiddle.openWindow (rxfiddle.js:1024)
    at Module../src/app.reducer.js (app.reducer.js:13)
    at __webpack_require__ (bootstrap:63)
    at Module.<anonymous> (bundle-1.7.1r-1.js:181364)
    at Module../src/router/router.js (bundle-1.7.1r-1.js:181534)
    at __webpack_require__ (bootstrap:63)
    at Module.<anonymous> (app.js:1)
    at Module../src/app.js (bundle-1.7.1r-1.js:169098)
    at __webpack_require__ (bootstrap:63)
    at Module../src/index.js (index.js:1)
    at __webpack_require__ (bootstrap:63)
    at Object.0 (bundle-1.7.1r-1.js:181661)
    at __webpack_require__ (bootstrap:63)

Where rxfiddle.js:446 points to Rx.subjects.prototype being undefined

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

1 participant