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 not found: Error: Can't resolve '@kepler.gl/components' #2842

Open
AlfredoRuizXcaliburmp opened this issue Dec 17, 2024 · 14 comments
Assignees
Labels
bug Something isn't working

Comments

@AlfredoRuizXcaliburmp
Copy link

Describe the bug
Hi there

I'm trying to add kepler.gl to my react project but I can't get it to recognize the module. I've checked that it's in Packjson and Node_modules.

Screenshots
Screenshot from 2024-12-17 07-29-00
Screenshot from 2024-12-17 07-21-40

Desktop (please complete the following information):

  • OS: Windows 11, Linux Ubuntu 22
  • Browser Chrome, Firefox
  • kepler.gl 3.0.0, 3.1.0-alpha.1,
  • react 18,17,16,
  • node 20, 18
@AlfredoRuizXcaliburmp AlfredoRuizXcaliburmp added the bug Something isn't working label Dec 17, 2024
@AlfredoRuizXcaliburmp
Copy link
Author

Screenshot from 2024-12-17 08-41-15
Screenshot from 2024-12-17 08-43-40

Ok, I was using the alpha version of kepler.gl/components but it still doesn't load anything

@AlfredoRuizXcaliburmp
Copy link
Author

Screenshot from 2024-12-17 08-56-25
"More than one copy of react-palm was loaded"

@AlfredoRuizXcaliburmp
Copy link
Author

AlfredoRuizXcaliburmp commented Dec 17, 2024

Now is
WARNING in ./node_modules/@formatjs/fast-memoize/lib/index.js
Module Warning (from ./node_modules/react-scripts/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/workspace/javascript/kepler-demo/node_modules/@formatjs/fast-memoize/index.ts' file: Error: ENOENT: no such file or directory, open '/workspace/javascript/kepler-demo/node_modules/@formatjs/fast-memoize/index.ts'

@igorDykhta
Copy link
Collaborator

igorDykhta commented Dec 24, 2024

Hi @AlfredoRuizXcaliburmp
Could you try with the latest alpha? 3.1.0-alpha.3

@AlfredoRuizXcaliburmp
Copy link
Author

Hi @igorDykhta

It now detects the alpha version of both components and redicers. I still can't get it to show me the base map with either Mapbox or Maplibre and I still get the error that it can't locate the file: /node_modules/@formatjs/fast-memoize/index.ts

Thank you very much and happy holidays

@AlfredoRuizXcaliburmp
Copy link
Author

More than one copy of react-palm was loaded. This may cause problems.

Screenshot from 2024-12-26 10-48-19

@igorDykhta igorDykhta self-assigned this Dec 26, 2024
@igorDykhta
Copy link
Collaborator

Hi @AlfredoRuizXcaliburmp
Just checked the latest alpha and I see the map, and don't see the missing @formatjs error message.

basic-app-with-latest-alpha.zip

@AlfredoRuizXcaliburmp
Copy link
Author

Hi @igorDykhta

Thank you very much for your help.

The error occurs when I run a react.js project locally without build.

@AlfredoRuizXcaliburmp
Copy link
Author

Screenshot from 2024-12-27 10-01-41

@AlfredoRuizXcaliburmp
Copy link
Author

I have found that if I do not use esbuild when loading a dataset I get the following error

Screenshot from 2024-12-30 06-57-19

I understand that it is essential to use esbuild?

Thank you very much, happy holidays and a prosperous new year.

@igorDykhta
Copy link
Collaborator

igorDykhta commented Dec 30, 2024

No, esbuild shouldn't be mandatory.
You can attach your minimal project / config here so I can take a look.

@AlfredoRuizXcaliburmp
Copy link
Author

my-app.zip

I'm playing a little crazy

@AlfredoRuizXcaliburmp
Copy link
Author

Hi, I just noticed that despite passing the MapBox token, it is loading MapLibre and in the demo I see that it is the same.
Screenshot from 2025-01-02 15-31-23
Screenshot from 2025-01-02 15-33-52

@ibgreen
Copy link
Collaborator

ibgreen commented Jan 5, 2025

I believe there is a new config API where your app can configure which basemap to use. I.e. mapbox and maplibre are not both included so that they can be switched dynamically, you need to build your app with one or the other, and maplibre is the default.

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

3 participants