svg-pathdata icon indicating copy to clipboard operation
svg-pathdata copied to clipboard

TS7016: Could not find a declaration file for module 'svg-pathdata'

Open vadimcoder opened this issue 1 year ago • 0 comments

Issue

I'm a gentledev i:

  • [X] fully read the README recently
  • [X] searched for existing issues
  • [X] checked i'm up to date with the latest version of the project

Expected behavior

no TS errors

Actual behavior

error TS7016: Could not find a declaration file for module 'svg-pathdata'. 'svg-pathdata/lib/SVGPathData.module.js' implicitly has an 'any' type. There are types at 'svg-pathdata/lib/SVGPathData.d.ts', but this result could not be resolved when respecting package.json "exports". The 'svg-pathdata' library may need to update its package.json or typings.

Steps to reproduce the behavior

  1. Typescript v5
  2. moduleResolution: bundler in tsconfig.json
  3. import { SVGPathData } from "svg-pathdata";

Debugging informations

  • node -v result:
v18.20.0
  • npm -v result:
10.5.0

This may be caused by new versions of Typescript.

vadimcoder avatar Jun 09 '24 16:06 vadimcoder