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

Import module error from Javascript #248

Open
pierzen opened this issue Dec 11, 2024 · 0 comments
Open

Import module error from Javascript #248

pierzen opened this issue Dec 11, 2024 · 0 comments

Comments

@pierzen
Copy link

pierzen commented Dec 11, 2024

Import module error
Running jsfiddle.net from link in https://www.jsdelivr.com/package/npm/@geoblocks/ol-maplibre-layer returns an error message pointing to maplibre-gl library missing an export named 'Map'. I have the same problem running from Javascript.

Success importing maplibre-gl module
But with instruction [ import "https://cdn.jsdelivr.net/npm/[email protected]/dist/maplibre-gl.js"; ], instruction [ new maplibregl.Map() ] returns a map.

jsFiddle.net instructions
import * as geoblocksolMaplibreLayer from 'https://esm.run/@geoblocks/ol-maplibre-layer';

Console log message
"Uncaught SyntaxError: The requested module '/npm/[email protected]/+esm' does not provide an export named 'Map'"

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