-
Notifications
You must be signed in to change notification settings - Fork 919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find a declaration file for module '@turf..." #2553
Comments
Thanks for raising the issue @wjlee2020 . I'm working on a PR at the moment that should improve the declarations that are shipped. Would you be happy to give that a try once the next v7.0.0-alpha is released? The only shorter term option I can think of would be to edit or patch the files already installed in your node_modules/ folder - not ideal. |
@wjlee2020 can you please provide some more info about your environment? Vanilla node app, NextJS, Vite? Does the error appear in VSCode, or does it only show up when you're building? Any other details would be a help to reproduce the problem and also make sure the PR fixes it. Thanks! |
@smallsaucepan I apologize for the lack of details
Currently, I have made a declare module "@turf/turf" {
export function point(coordinates: number[]): any;
export function polygon(coordinates: [number, number][][][]): any;
export function booleanPointInPolygon(point: any, polygon: any): boolean;
} to help me remove the typescript errors for the turf modules I am using.
Please let me know if you would like more information 🙇🏻♂️ |
I am having this problem too with svelte kit 2.0.0 and svelte 4.2.7, turf 6.5 and typescript 5.. Resolving this by editing the |
I faced this issue today trying to use turf in a vite/react project. Following #2521 (comment) resolves my issue. I'm using the latest alpha turf, |
Please provide the following when reporting an issue:
The version of Turf you are using, and any other relevant versions.
"@turf/helpers": "^6.5.0",
"@turf/simplify": "^6.5.0"
Snippet of source code or for complex examples use jsfiddle.
when using an import statement, i get
Could not find a declaration file for module '@turf/simplify'.
ts error.It's the same with all other modules even @turf/turf.
Any ideas/tips?
The text was updated successfully, but these errors were encountered: