perliedman/geojson-path-finder

Unable to use Constructor in typescript environment.

Closed this issue · 1 comments

Package Version : v2.0.2

I am trying to recreate searoute-js using typescript for some learning however when trying to call the constructor I receive an error.

Error

Error [TypeError]: geojson_path_finder__WEBPACK_IMPORTED_MODULE_5__ is not a constructor

Caused by:

import marnet from "../data/marnet.json";
import PathFinder from "geojson-path-finder";

const geoJson = marnet as FeatureCollection<LineString>;
const pathFinder = new PathFinder(geoJson);

marnet.json

I noticed that the docs do not have a full typescript example so I am most likely doing something wrong.

It was an issue with a custom package in the turbo repo.