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

Using the map causes a "ReferenceError: module is not defined" in browser #16

Open
BesitecMH opened this issue Jul 17, 2024 · 0 comments

Comments

@BesitecMH
Copy link

Describe the bug
I just added the add-on to my project. Running the application and opening the page in browser causes a Javascript error breaking the startup. (Using Vaadin 23.5.2)
The browser's console reports a "ReferenceError: module is not defined" with a link. The link leads to the "Sources" where the "leaflet-canvas-marker/node_modules/rbush/index.js" show the error for code line "module.exports = rbush".

image

I have the problem with my complex project while upgrading from Vaadin 14 to 23. (Previously used the predecessor add-on of this one.)
I could not reproduce with a Vaadin 23 skeleton project. But Markus from chat support could in the first step. Later, playing around with the add-on's version, the error vanished also from his example.

To Reproduce
Steps to reproduce the behavior:

  1. Download: https://github.com/vaadin/skeleton-starter-flow/archive/v23.zip
  2. Add add-on dependency to pom.xml (version 1.0.1)
  3. Needed also to add the following not to get a Jackson error on startup
<dependency>
  <groupId>de.grundid.opendatalab</groupId>
  <artifactId>geojson-jackson</artifactId>
  <version>1.13</version>
</dependency>
  1. Add code snippet from to MainView: https://vaadin.com/directory/component/leaflet
  2. Run application

Expected behavior
The error should not appear ;-)

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 126.0.6478.128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant