mapbox / mapbox/mapbox-gl-draw
Library crashing with source-map-loader in angular 15
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
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
- Build an angular 15 project
- npm download mapbox.gl-js and mapbox-gl-draw
- import mapbox-gl-draw into the project to add MapboxDraw
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Angular 15 build using the listed mapbox-gl-js and mapbox-gl-draw versions, then inspect node_modules/@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.js and node_modules/source-map-loader/dist/cjs.js around the reported index.js import. Done means the project compiles normally when importing MapboxDraw.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, javascript
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100