keplergl / kepler.gl

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
http://kepler.gl
MIT License
10.3k stars 1.73k forks source link

[Bug][Jupyter Widget]: dev install gives Uncaught Error: Could not find "store" #1065

Open maartenbreddels opened 4 years ago

maartenbreddels commented 4 years ago

Describe the bug Dev install does not produce a working nbextension, upon creating a widget view, the js dev console gives:

Uncaught Error: Could not find "store" in the context of "Connect(Container)". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to Connect(Container) in connect options.

Note that creating the widget works, but looking at the code it seems you only create the kepler object when the view is created:

To Reproduce

Expected behavior A clear and concise description of what you expected to happen.

Environment (please complete the following information):

$ node --version                                                                                                                                                    dev
v12.11.1
$ npm --version                                                                                                                                                     dev
6.11.3
$ yarn --version                                                                                                                                                    dev
1.21.1
maartenbreddels commented 4 years ago

Maybe it's an idea to commit package/yarn lock files?

macrigiuseppe commented 4 years ago

@maartenbreddels few notes:

maartenbreddels commented 4 years ago

Thanks Giuseppe,

I see a top level yarn.lock, but does that influence the packages in https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/js/package.json ?

  • make sure all kepler.gl peer dependencies are satisfied. I think you may have an old version or redux and/or react-redux

How do I do that?

cheers,

Maarten

heshan0131 commented 4 years ago

https://github.com/keplergl/kepler.gl/pull/1110

heshan0131 commented 4 years ago

@maartenbreddels Can you upgrade to keplergl==0.2.0, it should fix it

maartenbreddels commented 4 years ago

I pulled from master, ran git clean and the whole machinery again, but get the same issues.

heshan0131 commented 4 years ago

try delete node_modules and yarn.lock in bindings/kepler.gl-jupyter/js then run yarn

if still save error, see if your yarn.lock set different version for:

    "react": "^16.8.4",
    "react-dom": "^16.8.4",
    "react-redux": "^7.1.3",
    "redux": "^3.7.2",
    "redux-actions": "^2.2.1"
maartenbreddels commented 4 years ago
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-redux": "^7.1.3",
"redux": "^3.7.2",
"redux-actions": "^2.2.1"

This is what fixed it! I hope that feedback is useful. Do you know the root issue?

heshan0131 commented 4 years ago

yes because we updated dependencies, git clean doesn't cleanup the older version in the node_modeuls, you were still loading the older version of redux