Open samYnsat opened 1 year ago
For now, the only thing i could do to fix this it has been to downgrade to Angular 14 and change the tsconfigfile.json almost completely.
I have maplibre and mapbox draw working just fine in Angular 15. I would suggest you set esModuleInterop to true in your top-level tsconfig, and add also install @types/mapbox__mapbox-gl-draw. You'll then need to remove the "* as" from your import: import MapboxDraw from '@mapbox/mapbox-gl-draw';
I have just installed this mapbox-gl-draw into my angular 15 project with the types. Each type I import the it like this:
import * as MapboxDraw from '@mapbox/mapbox-gl-draw';
It gives me an error about other pre-installed library called sourece-map-loader I tried to downgrade the version until 1.2.0 that is the first one but the problem contiues.mapbox-gl-js version: 2.12.0 mapbox-gl-draw version: 1.3.0
Steps to Trigger Behavior
Expected Behavior
Normal compiling.
Actual Behavior
I have an error in the index.js `Compiled with problems:
ERROR in ./node_modules/@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.js
Module build failed: .../node_modules/source-map-loader/dist/cjs.js:3 import loader, { raw } from "./index.js";`
Thank you very much!