perliedman / geojson-path-finder

Find shortest path through a network of GeoJSON
https://www.liedman.net/geojson-path-finder/
ISC License
300 stars 86 forks source link

tinyqueue - Queue is not a constructor error #74

Closed IPWright83 closed 3 years ago

IPWright83 commented 3 years ago

There seems to be an issue with the npm package, basically the require of tinyqueue in dijkstra.js isn't working properly for me. When running the code I get the following error:

dijkstra.js:8 Uncaught TypeError: Queue is not a constructor at module.exports (dijkstra.js:8) at PathFinder.findPath (index.js:43) at route (index.js:76) at eval (index.js:107)

IPWright83 commented 3 years ago

Turns out this only happens if you try and run this in a browser - it's fine in Node

IPWright83 commented 3 years ago

Just noticed this is a duplicate of https://github.com/perliedman/geojson-path-finder/issues/71