keplergl / kepler.gl

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

Function not found #440

Closed jofri99 closed 5 years ago

jofri99 commented 5 years ago

Describe the bug When I try to run your example replace-component I get the following error: TypeError: _components.PanelToggleFactory is not a function

To Reproduce Steps to reproduce the behavior:

  1. clone git https://github.com/uber/kepler.gl.git
  2. got to kepler.gl/examples/replace-component/src
  3. run sudo npm install
  4. run export MapboxAccessToken=MapboxToken
  5. run npm start
  6. The error appears in the Browser console

Expected behavior How to fix the issue when its mine

Screenshots grafik

Desktop (please complete the following information):

Smartphone (please complete the following information): No Smartphone

Additional context I get this problem while I try to understand how to customize the UI of keplergl

hb0 commented 5 years ago

This error does also occur on 18.04.

It does not occur (using the reproduction steps above) with the version on tag 0.2.3 (commit https://github.com/uber/kepler.gl/commit/9e750a069a954102c49c5c532f4001490d2ede4a).

heshan0131 commented 5 years ago

This should be fixed in 0.2.4, at the meantime comment out line 61 in examples/replace-component/src/app.js will get the app up and running

hb0 commented 5 years ago

Thanks, this fixes it!

const KeplerGl = injectComponents([
  [SidebarFactory, CustomSidebarFactory],
  [PanelHeaderFactory, CustomPanelHeaderFactory],
//  [PanelToggleFactory, CustomPanelToggleFactory]
]);
heshan0131 commented 5 years ago

0.2.4 is published, and examples are updated. resolve it now