I have been using Apple Mapkit JS POI search and reverseGeoLocation search in the browser and want to move my code to Firebase functions (node.js).
I can import mapkit using mapkit-npm (or just downloading the latest CDN file and importing that directly).
When I declare mapkit using const mapkit = require() I get an error "window is undefined".
I have tried to use NPM jsDOM to create a window object, but I'm still getting errors which I think are due to fields missing on either my window or navigator objects. (errors such as "Cannot perform toLowerCase on undefined").
Please can someone help me run mapkit in a non-browser environment?
Thanks :)