windy.com - TypeError: Error resolving module specifier: @leafletGl

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
Veit Kannegieser
Moonbather
Moonbather
Posts: 74
Joined: 2019-03-23, 19:16

windy.com - TypeError: Error resolving module specifier: @leafletGl

Post by Veit Kannegieser » 2026-04-18, 13:45

https://www.windy.com/ does only show a logo since about a month.
The console has
TypeError: Error resolving module specifier: @leafletGl index.js

https://www.windy.com/v/49.1.1.ind.eb7f/index.js from 2026-03-18 is minified, the triggering code seem to be like this:

Code: Select all

import
{
  LatLngBounds as g,
  Point as v,
  addProtocol as b,
  TileLayer as _,
  ReferenceCountedCache as w,
  GridLayer as y,
  falseFn as E,
  wrappedCoords as T,
  DomUtil as A,
  LeafletGlMap as S,
  LatLng as C,
  Icon as P,
  Marker as R,
  KML as x,
  getVersion as I,
  DivIcon as L,
  LatLngGraticule as O,
  MercatorCoordinate as N,
  LngLat as M,
  LngLatBounds as D,
  getCoordsKey as U,
  TileCache as k,
  isWebGL2 as F,
  Bounds as G,
  OverscaledTileID as B
} from"@leafletGl";
The main page source html header has

Code: Select all

<script type="importmap">{
            "imports": {
                "@windyCore": "./v/49.1.1.ind.eb7f/index.js",
                "@leafletGl": "./v/49.1.1.ind.eb7f/leaflet-gl.js"
            }
        }</script>
<script type="module" src="v/49.1.1.ind.eb7f/leaflet-gl.js" async>
</script>
<script type="module" src="v/49.1.1.ind.eb7f/index.js">
</script>
Is the importmap in the wrong order?

Looks like leaflet-gl needs WebGL, but that works.

On network connections, forcing refresh i see download of "/", "index.css", "leaflet-gl.js", "index.js", .. all status code 200.

User avatar
Moonchild
Project founder
Project founder
Posts: 39260
Joined: 2011-08-28, 17:27
Location: Sweden

Re: windy.com - TypeError: Error resolving module specifier: @leafletGl

Post by Moonchild » 2026-04-18, 14:20

We currently don't support importmaps.
Issue #2464 (UXP)
Assistance welcome!
"Praise from a narcissistic person is always a poison dart. They don't share the stage, so discernment matters." - Dr. Ramani
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Veit Kannegieser
Moonbather
Moonbather
Posts: 74
Joined: 2019-03-23, 19:16

Re: windy.com - TypeError: Error resolving module specifier: @leafletGl

Post by Veit Kannegieser » 2026-04-18, 23:30

Moonchild wrote:
2026-04-18, 14:20
We currently don't support importmaps.
Thanks for the hint! I have tried with Modify HTTP Response,

Code: Select all

www.windy.com
    /v/49.1.1.ind.eb7f/index.js
        /"@leafletGl"/gi
        "/v/49.1.1.ind.eb7f/leaflet-gl.js"
    /v/49.1.1.ind.eb7f/plugins/rhbottom.js
        /"@windyCore"/gi
        "/v/49.1.1.ind.eb7f/index.js"
..some 20 more..
    /v/49.1.1.ind.eb7f/plugins/_shared-radiation.js
        /"@windyCore"/gi
        "/v/49.1.1.ind.eb7f/index.js"
and i can plan tomorrows hike.
Would like to know what are the expression to match multiple paths like /v/(.*)/plugins/(.*).js.

User avatar
adoxa
Astronaut
Astronaut
Posts: 626
Joined: 2019-03-16, 13:26
Location: Qld, Aus.

Re: windy.com - TypeError: Error resolving module specifier: @leafletGl

Post by adoxa » 2026-04-19, 01:36

Veit Kannegieser wrote:
2026-04-18, 23:30
Would like to know what are the expression to match multiple paths like /v/(.*)/plugins/(.*).js.
Same as the pattern (/regex/): /\/v\/.*\/plugins\/.*\.js/ (no need to capture, there's nothing you can do with them).

User avatar
Veit Kannegieser
Moonbather
Moonbather
Posts: 74
Joined: 2019-03-23, 19:16

Re: windy.com - TypeError: Error resolving module specifier: @leafletGl

Post by Veit Kannegieser » 2026-04-22, 21:43

Thanks, this helps reducing the modifications to:

Code: Select all

www.windy.com
    /\/v\/.*\/plugins\/.*\.js/
        /"@leafletGl"/g
            "../leaflet-gl.js"
        /"@windyCore"/g
            "../index.js"
    /\/v\/.*\/.*\.js/
        /"@leafletGl"/g
            "./leaflet-gl.js"
        /"@windyCore"/g
            "./index.js"
or

Code: Select all

[["www.windy.com",["/\\/v\\/.*\\/plugins\\/.*\\.js/",["/\"@leafletGl\"/g","\"../leaflet-gl.js\"","/\"@windyCore\"/g","\"../index.js\""]],["/\\/v\\/.*\\/.*\\.js/",["/\"@leafletGl\"/g","\"./leaflet-gl.js\"","/\"@windyCore\"/g","\"./index.js\""]]]]