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]: Bad import on SimpleButton.js #3981

Open
1 task done
RiccardoRossiMori opened this issue Sep 3, 2024 · 2 comments
Open
1 task done

[Bug]: Bad import on SimpleButton.js #3981

RiccardoRossiMori opened this issue Sep 3, 2024 · 2 comments
Assignees
Labels

Comments

@RiccardoRossiMori
Copy link

Current Behavior

When importing the SimpleButton into my project following your tutorial, it gives me the error linked below.

Expected Behavior

Is not expected to give me an error and show the Button properly.

Steps To Reproduce

Follow the tutorial at this link "https://terrestris.github.io/react-geo-ws/latest/react-geo-ws/first-steps/erste-komponente.html" where you try to add the related component to your project.

Version

16.2.0

What browsers are you seeing the problem on?

No response

Relevant log output

ERROR in ./node_modules/@terrestris/react-geo/dist/Button/SimpleButton/SimpleButton.js 3:0-45
Module not found: Error: Can't resolve '../../constants' in 'D:\CodingWorkspace\myproj\my-app\node_modules\@terrestris\react-geo\dist\Button\SimpleButton'
Did you mean 'constants.js'?
BREAKING CHANGE: The request '../../constants' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@dnlkoch
Copy link
Member

dnlkoch commented Sep 20, 2024

Thanks for your report @RiccardoRossiMori!

I fear the workshop hasn't been tested against the latest version of react-geo yet and I guess some additional config for the bundler is needed since we changed the module type. As I'm not sure if and when we'll update the workshop materials, I would suggest you to take a look at the react-geo-client-template application meanwhile. It'll give you some good insights in how to make use of the library in a project.

@RiccardoRossiMori
Copy link
Author

Don't mention it, @dnlkoch !

Unfortunately I already started my Thesis project with the plain OpenLayers and I'm about to get my degree. It would have been amazing to use your library instead.
I'll probably take a look at it after I've got my degree in my pocket and I'll try to switch.

Best regards,
Riccardo Rossi Mori.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants