-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
error while adding hexbin or grid layer in react keplerGL app #1601
Comments
this should be fixed by adding |
Exactly the same bug!
|
I'm still having the same errors when I add in the aggregation layer
|
Can you post a reproducible repo? The |
@heshan0131 Unfortunately, fixed version of Deck GL packages (8.2.0) blocked a lot of Deck GL functionality we used, for improving our User experience - on of them is a chance to traverse tiles on viewport load for Deck GL layers, that is a functionality of Deck that we used cause it wasn't available via Kepler so we used it directly (super useful to let the user interact with every tile of a tile layer). |
I have created the repo and the link to the repo is https://github.com/Jdave860/keplergl-demoapp.git |
Just a quick solution that worked for me. In first place my package.json in the "resolutions" key was like the snippet below:
By searching the web I found that deck.gl and luma.gl are moving in parallel. Also the class constructor Geometry error is created by importing Geometry from @luma.gl/core. After deleting my node_modules files and running yarn install I noticed in yarn.lock that deck.gl was in 8.2.0 (as it should be) but luma.gl was upgraded to ^8.5.4 which probably causes the error. so, I also added luma libraries in "resolutions" key like the snippet below, I deleted my "node_modules" folder and "yarn.lock" file again and finally I re-run yarn install
And the error gone. Now I was able to change point to hexbin and vise-versa without any errors. |
I added resolutions as suggested in the thread by @ikrik and got the same outcome as @Jdave860 where it fixed the grid layer but not the hex layer. Similar error: Looks like my project is also building from deck.gl ES6, which I assume is how kepler.gl is using deck.gl internally. Could you help @heshan0131 with what a 'proper' babel setup would be in order to see if that fixes the issue? |
Current keplergl version may cause keplergl/kepler.gl#1601
I was learning how to work with kepler using your doc https://docs.kepler.gl/docs/keplergl-jupyter and was stuck there because of this error, It's nice to remove it from your doc till the issue is resolved. |
Yep, seems like the newest keplergl-jupyter package also has this error, at least v0.3.2. Probably the bug was introduced here: #1617 Had to downgrade keplergl-jupyter for our Jupyter Notebook to work. Looks like v0.3.0 keplergl-jupyter still works. |
One simple solution for it (though not perfect): I did not check whether in other places replacing |
@ejrtn You may try my solution if you build kepler.gl by yourself. |
Any solution that works for hexbin class constructor bug My Package.json |
Can We use Bing Map as base Map for kepler gl, Can anyone pls answer this ?? |
I'm having the same error. "Class constructor Geometry cannot be invoked without 'new'"" Does anybody have a solution for this? Thanks! |
This doesn't fix the issue unfortunately. |
Try adding the following to resolutions and scripts in package.json, this worked for kepler.gl version 2.5.4
|
I tried your solution but I still got the same erro "Class constructor Geometry cannot be invoked without 'new'"" |
I tried all the above solutions and unfortunately I still see the same error. Does anyone has any update on this? |
Hello rayavarapusrikanth, please join the slack community for Kepler GL so i can share with you the solution i did. Best, Click on the invite link shared in this page |
Would be great if you could share it here too so we can all benefit from it
:)
On Mon, 17 Oct 2022 at 19:03, sinannoureddine ***@***.***> wrote:
I tried all the above solutions and unfortunately I still see the same
error. Does anyone has any update on this?
Hello rayavarapusrikanth, please join the slack community for Kepler GL so
i can share with you the solution i did. Best,
#643 <#643>
Click on the invite link shared in this page
—
Reply to this email directly, view it on GitHub
<#1601 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUXO6XQTHWRAFC3I2ACCB53WDWIIRANCNFSM5DLKIJMQ>
.
You are receiving this because you commented.Message ID: <keplergl/kepler.
***@***.***>
--
--
*Ben Morris* / CTO
***@***.*** ***@***.***> / +44 7765 103
723
Futurehand Ltd.
29/31 Monson Rd, Tunbridge Wells, TN1 1LS
w3w: ever.arrow.verbs <https://what3words.com/ever.arrow.verbs>
www.futurehand.co.uk
|
thanks @sinannoureddine for your response and also for sharing static html file with working hexbin and grid layers. I also found that when I clone kepler.gl repo and built it locally and run the app, then I don't see this issue and everything working fine. I assume there is fix ready for the above issue in code and it's just we need a new release with those changes. I see the last version is a year ago. Any idea on when we can expect a new version of Kepler.gl package? |
That's the reason we don't see this issue in kepler.gl/demo as it's build on latest code instead of Kepler.gl package. I hope we get newer version of package soon as many people are facing this issue. |
Good shout. For now we should just build the package locally from the repo instead of installing from NPM then... Until a version bump is done by the maintainers. |
can someone point to guide to build the kepler.js package locally and use it in our react project? |
Hi there, is it going to be fixed? |
The error persists as of the date of this message. |
I worked on kepler gl a year ago . I remember this works pn production build and we get error in development build so just use production build. At the end of day we will deploy the production build only |
Describe the bug
I am trying to visualized the Point data in keplergl using React app and wanted to add Hexbin or Grid layer but giving me errors.
Errors:
An error in deck.gl: Cannot read property '8' of undefined in nb74usl
An error in deck.gl: Cannot read property 'sortedBins' of undefined in nb74usl-hexagon-cell
To Reproduce
Steps to reproduce the behavior:
An error in deck.gl: Cannot read property '8' of undefined in nb74usl
An error in deck.gl: Cannot read property 'sortedBins' of undefined in nb74usl-hexagon-cell
Expected behavior
Should visualize the point data with hexbin or Grid layer
Screenshots
](url)
React and keplerGL version with supported Dependencies:
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"kepler.gl": "^2.5.4",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"styled-components": "^5.0.1",
"swr": "^0.1.18",
"web-vitals": "^1.0.1"
Additional context
I tried using the given solution on GitHub to add Colorbrewer 1.5.0 version but it still doesn't work.
The text was updated successfully, but these errors were encountered: