I'm getting ReferenceError: navigator is not defined running the following code on node.js:
navigator.geolocation.getCurrentPosition((data) => {
console.log(data);
});
I assume that the problem is that Navigator.geolocation is a Web API and doesn't work on node. Is there a way to mock the browser and use it on node.js?
Many thanks