Turf: Module '"@turf/helpers"' has no exported member

Created on 21 Apr 2019  路  7Comments  路  Source: Turfjs/turf

using

import booleanPointInPolygon from '@turf/boolean-point-in-polygon'
with typescript
I get

node_modules/@turf/boolean-point-in-polygon/index.d.ts:1:10 - error TS2305: Module '"@turf/helpers"' has no exported member 'Coord'.

import { Coord, Feature, MultiPolygon, Polygon, Properties } from "@turf/helpers";

using versions
"@turf/boolean-point-in-polygon": "^6.0.1",
"@turf/helpers": "^6.1.4",

typescript

Most helpful comment

Try removing @types/turf

All 7 comments

@guyisra have you found any solution to this?

I used require and not import :/

Alternatively try and rollback to the version 5 releases, they were the last stable release.

I am having the same issue. In fact, so far, every geospatial lib I've tried to use fails with typescript...

Using require does not fix it for me

UPDATE:

Upgrading to typescript 3.2.2, and adding a declaration file for turf fixed it

Try removing @types/turf

Same here:

ERROR in node_modules/@turf/bearing/index.d.ts:1:10 - error TS2305: Module '"@turf/helpers"' has no exported member 'Coord'.

1 import { Coord } from "@turf/helpers";

using versions
"@turf/bearing": "^6.0.1",
"@turf/distance": "^6.0.1",
"@turf/helpers": "^6.1.4",
"@turf/turf": "^5.1.6",

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stebogit picture stebogit  路  5Comments

MichelBahl picture MichelBahl  路  4Comments

mnvx picture mnvx  路  3Comments

rheh picture rheh  路  5Comments

morganherlocker picture morganherlocker  路  5Comments