mapbox / mapbox/mapbox-gl-draw
yarn dev failed wit version 1.5.0 and 1.4.3 - next.js
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
My dependencies
`"dependencies": {
"@headlessui/react": "^2.2.0",
"@heroicons/react": "^2.2.0",
"@mapbox/mapbox-gl-draw": "^1.5.0",
"@turf/turf": "^7.2.0",
"@types/mapbox__mapbox-gl-draw": "^1.4.8",
"electron-is-dev": "^3.0.1",
"mapbox-gl": "^3.10.0",
"next": "15.2.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-error-boundary": "^5.0.0",
"react-icons": "^5.5.0"
},`
I'm hitting this problem
` ⨯ ./node_modules/@mapbox/mapbox-gl-draw/index.js:4:1
Module not found: Can't resolve './src/modes/index.js'
2 | import setupOptions from './src/options.js';
3 | import setupAPI from './src/api.js';
> 4 | import modes from './src/modes/index.js';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 | import * as Constants from './src/constants.js';
6 | import * as lib from './src/lib/index.js';
7 |
`
` ⨯ ./node_modules/@mapbox/mapbox-gl-draw/index.js:6:1
Module not found: Can't resolve './src/lib/index.js'
4 | import modes from './src/modes/index.js';
5 | import * as Constants from './src/constants.js';
> 6 | import * as lib from './src/lib/index.js';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 |
8 | const setupDraw = function(options, api) {
9 | options = setupOptions(options);
`
among other errors when running dev
actually it looks like './src/modes' and '.src/lib' is empty in `node_modules/@mapbox/mapbox-gl-draw/src/modes`
i dont see anyone having this issue so it might be my settings help would be appreciated
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
Start with the reported imports in node_modules/@mapbox/mapbox-gl-draw/index.js and inspect whether src/modes/index.js and src/lib/index.js are present in the installed package. Reproduce the failure with yarn dev using the listed dependencies; the issue is resolved when these imports load without the reported module-not-found errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, next.js
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100