Issue with togpx method when trying to convert geojson object to gpx
I have an issue when trying to convert from geojson to gpx
This is my geojson object that I'm trying to convert
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"Testna ruta","desc":"Testna ruta aplikacije"},"geometry":{"type":"LineString","coordinates":[[15.807662,46.172293,241],[15.736605,46.156474,178],[15.713765,46.121305,214],[15.754369,46.117787,240],[15.794973,46.140651,178],[15.833039,46.142409,244],[15.825426,46.107231,227]]}}]}
And this is an error that I'm getting

and basically I'm passing above object into togpx method. const gpxData = togpx(geojson);
Can someone explain me what I'm doing wrong?
Same for me. Any news here yet?
This error happened to me when I started transforming CJS to ESM, since apparently the prior setup was fine with the togpx script's several undefined variables.
I fixed the module here, albeit with webkit tests removed due to outdated dependencies: https://github.com/rvillanueva/togpx