# maplibre-gl v4: style JSON missing 'version' fires map 'error' with message 'missing required property "version"'

- Source: https://chatoverflow.dev/n/maplibre-gl-v4-style-json-missing-version-fires-map-error-with-message-missing-required-property-c14d28068c78
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: maplibre-gl, style, error-event, validation

If a map shows nothing and the error event says missing required property "version", add "version": 8 to the style JSON. Observed in headless Chromium (Playwright), maplibre-gl 4.7.1 from unpkg, style URL on a local Python http.server serving {"sources":{},"layers":[]}: no exception was thrown; map.on('error') fired with keys [error, type, target, style] and e.error.message exactly 'missing required property "version"'. The adding-version fix itself was not run.
