Closed zxwild closed 1 month ago
Hi, not sure what's going on here. The lib builds for me with the imports as they are today (from @turf/helpers
). Changing the import like you suggest above breaks the build for me ("Cannot find module 'geojson' or its corresponding type declarations").
Also checked some other projects, and they also import Position
from @turf/helpers
.
For me, the TypeScript definition seems to come from node_modules/@turf/helpers/dist/js/lib/geojson.d.ts
. FWIW, I have version 6.5.0 of @turf/helpers installed.
FWIW, I have version 6.5.0 of @turf/helpers installed.
That's the thing, I use turf 7.0. Turf 6.5 uses its own types, turf 7 uses geojson package.
Any plans to update to 7.0? 😄 It's released 3 weeks ago and should be the default version since the release.
Hm, yes using other versions of dependencies than listed in package.json
will lead to trouble.
Since I'm not actively working on this project or really have any time to put into open source at the moment, the short answer is "no". I will likely update at some point, but not now.
Hi, I'm unable to build my project, there is the typescript error:
I found it's followed by these lines in
geojson-path-finder
(there are 3 places):import { Position } from "@turf/helpers";
And it looks reasonable, turf/helpers doesn't export the Position type.
Could you the imports this way?
from:
import { Position } from "@turf/helpers";
to:import { Position } from 'geojson';