keplergl / keplergl/kepler.gl

keplerGlReducer in NextJS - ReferenceError: ReadableStream is not defined [Bug]

Open
#2,037 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
12k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
66

Description

While trying to implement keplerGl i got an error : "ReferenceError: ReadableStream is not defined in node_modules\react-dom\cjs\react-dom-server.browser.development.js:6958:20", anytime i try to import "import keplerGlReducer, { uiStateUpdaters } from 'kepler.gl/reducers' in the store

Here is my store.js:

`import { composeWithDevTools } from 'redux-devtools-extension';
import { createStore, combineReducers, applyMiddleware } from 'redux';
import keplerGlReducer, { uiStateUpdaters } from 'kepler.gl/reducers'
import { appReducer } from './reducers/appReducer';
import { appStateReducer } from './appState'
import thunk from 'redux-thunk'

const customizedKeplerGlReducer = keplerGlReducer.initialState({
uiState: {
// hide side panel to disallower user customize the map
readOnly: false,

// customize which map control button to show
mapControls: {
...uiStateUpdaters.DEFAULT_MAP_CONTROLS,
visibleLayers: {
show: false,
},
mapLegend: {
show: true,
active: true,
},
toggle3d: {
show: true,
},
splitMap: {
show: false,
},
},
},
})
const reducers = combineReducers({
appState: appStateReducer,
keplerGl: customizedKeplerGlReducer
});
const middleware = [thunk];

export const store = createStore(
reducers,
initialState,
composeWithDevTools(applyMiddleware(...middleware))
);`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the store.js example, especially the import of kepler.gl/reducers, and inspect the reported react-dom-server.browser.development.js location where ReadableStream is referenced. Reproduce the NextJS import path and determine the runtime mismatch; done means importing the reducer no longer raises the reported ReferenceError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nextjs, react
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.