Skip to content

Fix TypeScript build by adding DOM lib to tsconfig#198

Closed
sania123b wants to merge 1 commit intometacall:masterfrom
sania123b:fix/add-dom-lib
Closed

Fix TypeScript build by adding DOM lib to tsconfig#198
sania123b wants to merge 1 commit intometacall:masterfrom
sania123b:fix/add-dom-lib

Conversation

@sania123b
Copy link
Copy Markdown

Summary

This PR fixes TypeScript build errors caused by missing DOM types
from @types/mapbox-gl.

Problem

Running npm run build resulted in multiple TypeScript errors such as:

  • Cannot find name 'HTMLElement'
  • Cannot find name 'MouseEvent'
  • Cannot find name 'HTMLImageElement'

The errors were caused by missing DOM library definitions in tsconfig.json.

Solution

Added "DOM" to the lib array inside compilerOptions in tsconfig.json.

After this change:

  • npm run build completes successfully
  • TypeScript compiles without errors

Testing

Build verified locally using:
npm run build

@sania123b
Copy link
Copy Markdown
Author

Please let me know if this approach aligns with the project configuration.
Happy to adjust if another solution is preferred.

@sania123b
Copy link
Copy Markdown
Author

Did u checked??

@viferga
Copy link
Copy Markdown
Member

viferga commented Mar 9, 2026

This is correct but I just added it on all repos for allowing new protocol version

@viferga viferga closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants