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

[Bug] module.exports = require('./dist/reducers') #2530

Open
Virous77 opened this issue Feb 27, 2024 · 2 comments
Open

[Bug] module.exports = require('./dist/reducers') #2530

Virous77 opened this issue Feb 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Virous77
Copy link

Virous77 commented Feb 27, 2024

Describe the bug

I tried to setup kepler.gl locally in my project an defined, I followed the path and installed the dependencies but got the error related to
module.exports = require('./dist/reducers') when i started the development server.

Image 27-02-24 at 10 07 PM

  "kepler.gl": "^3.0.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-palm": "^3.3.8",
    "react-redux": "^9.1.0",
    "redux": "^5.0.1"

To Reproduce
Steps to reproduce the behavior:

All we have to setup new VITE project with above dependencies and setup store and start the project.

store.js

import { createStore, combineReducers, applyMiddleware } from "redux";
import keplerGlReducer from "kepler.gl/reducers";
import { taskMiddleware } from "react-palm/tasks";

function appReducer() {
  return {};
}
const initialState = {};

const keplerReducer = keplerGlReducer.initialState({
  uiState: {
    activeSidePanel: null,
    currentModal: null,
  },
});

const reducers = combineReducers({
  keplerGl: keplerReducer,
  app: appReducer,
});

export default createStore(
  reducers,
  initialState,
  applyMiddleware(taskMiddleware)
);

Desktop (please complete the following information):

  System:
    OS: macOS 14.3.1
    CPU: (8) arm64 Apple M1
    Memory: 142.66 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.6.1 - /opt/homebrew/bin/node
    Yarn: 1.22.21 - /opt/homebrew/bin/yarn
    npm: 10.2.4 - /opt/homebrew/bin/npm
  Browsers:
    Brave Browser: 121.1.62.165
    Firefox: 123.0
    Safari: 17.3.1

I tried in my linux system too but issue is same there.

@Virous77 Virous77 added the bug Something isn't working label Feb 27, 2024
@mstevesmith
Copy link

Not going to work with VITE.

@Virous77
Copy link
Author

Virous77 commented Mar 6, 2024

Not going to work with VITE.

The problem was same with CRA too so I tried multiple version of Redux and Kepler at last i was able to run with these dependency.

{
  "name": "example",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "assert": "^2.1.0",
    "kepler.gl": "^2.5.5",
    "querystring": "^0.2.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-palm": "^3.3.8",
    "react-redux": "^7.2.0",
    "react-scripts": "^5.0.1",
    "react-table": "^7.8.0",
    "redux": "^4.2.1",
    "url": "^0.11.3"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
}

The only problem is right now i have to force install all dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants