geoblocks / ol-maplibre-layer

Use a MapBox map as an OpenLayers layer
https://geoblocks.github.io/ol-maplibre-layer/demo.html
BSD 3-Clause "New" or "Revised" License
35 stars 5 forks source link

Webpack Error Import MapLibreLayer #191

Open AlvaroCodes opened 3 weeks ago

AlvaroCodes commented 3 weeks ago

Error https://github.com/openlayers/ol-webpack + ol-maplibre-layer

export 'MapLibreLayer' (imported as 'MapLibreLayer') was not found in '@geoblocks/ol-maplibre-layer' (module has no exports)

ERROR in ./node_modules/@geoblocks/ol-maplibre-layer/lib/index.js 1:0-59 Module not found: Error: Can't resolve './MapLibreLayer' in 'x/ol-webpack/node_modules/@geoblocks/ol-maplibre-layer/lib' Did you mean 'MapLibreLayer.js'? BREAKING CHANGE: The request './MapLibreLayer' 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. @ ./main.js 2:0-61 5:15-28

ERROR in ./node_modules/@geoblocks/ol-maplibre-layer/lib/index.js 2:0-75 Module not found: Error: Can't resolve './MapLibreLayerRenderer' in 'x/ol-webpack/node_modules/@geoblocks/ol-maplibre-layer/lib' Did you mean 'MapLibreLayerRenderer.js'? BREAKING CHANGE: The request './MapLibreLayerRenderer' 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. @ ./main.js 2:0-61 5:15-28

ERROR in ./node_modules/@geoblocks/ol-maplibre-layer/lib/index.js 3:0-79 Module not found: Error: Can't resolve './getMapLibreAttributions' in 'x/ol-webpack/node_modules/@geoblocks/ol-maplibre-layer/lib' Did you mean 'getMapLibreAttributions.js'? BREAKING CHANGE: The request './getMapLibreAttributions' 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.