sharedstreets / sharedstreets-js

SharedStreets (Node.js & Javascript)
https://sharedstreets.io
MIT License
78 stars 25 forks source link

TypeError: Cannot set property '_maxEntries' of undefined #50

Closed josiekre closed 5 years ago

josiekre commented 5 years ago

I'm running the CLI with a test file (line_2.in.geojson) and my own local line files. I ran locally and using a Docker. The following error results either way.

$ shst match line_2.in.geojson --out=out.geojson
  🌏  Loading geojson data...
       Matching using car routing rules on all streets
  ✨  Matching 1 lines...
(node:39135) Warning: N-API is an experimental feature and could change at any time.
TypeError: Cannot set property '_maxEntries' of undefined
    at RBush (/usr/local/lib/node_modules/sharedstreets/node_modules/rbush/rbush.js:65:22)
    at Object.geojsonRbush [as default] (/usr/local/lib/node_modules/sharedstreets/node_modules/geojson-rbush/index.js:22:16)
    at new TileIndex (/usr/local/lib/node_modules/sharedstreets/build/src/tile_index.js:66:57)
    at new Graph (/usr/local/lib/node_modules/sharedstreets/build/src/graph.js:300:30)
    at /usr/local/lib/node_modules/sharedstreets/build/src/commands/match.js:355:23
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/sharedstreets/build/src/commands/match.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/usr/local/lib/node_modules/sharedstreets/build/src/commands/match.js:3:12)
    at matchLines (/usr/local/lib/node_modules/sharedstreets/build/src/commands/match.js:277:12)
kpwebb commented 5 years ago

@josiekre it turns out another package that the project depended on broke last week -- we just removed that and pushed a fix. if you upgrade to 0.12.1+ this should work for you.

Thanks for flagging this