Skip to content

Import module error from Javascript #248

@pierzen

Description

@pierzen

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/maplibre-gl@4.7.1/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/maplibre-gl@4.7.1/+esm' does not provide an export named 'Map'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions