react-splide icon indicating copy to clipboard operation
react-splide copied to clipboard

Could not find a declaration file for module '@splidejs/react-splide'

Open raviverma2791747 opened this issue 10 months ago • 2 comments

Checks

  • [X] Not a duplicate.
  • [X] Not a question, feature request, or anything other than a bug report directly related to React Splide. Use Discussions for these topics: https://github.com/Splidejs/splide/discussions

Version

0.7.0

Description

Encountering this error when importing react splide module in NextJs 14 Could not find a declaration file for module '@splidejs/react-splide'. 'f:/lavange/lavange_ecommerce/lavange_ecommerce_client/node_modules/@splidejs/react-splide/dist/js/react-splide.esm.js' implicitly has an 'any' type. There are types at 'f:/lavange/lavange_ecommerce/lavange_ecommerce_client/node_modules/@splidejs/react-splide/dist/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@splidejs/react-splide' library may need to update its package.json or typings. @AllCategory.tsx:6:37

Reproduction Link

No response

Steps to Reproduce

  1. Initialize a new latest next project
  2. Install react-splide
  3. Import react-splide module ...

Expected Behaviour

The module should be imported without any errors. The type declaration should be automatically found.

raviverma2791747 avatar Dec 31 '24 20:12 raviverma2791747

hey, we've same error

RackayPI avatar Jan 09 '25 21:01 RackayPI

hey, we've same error

https://github.com/Splidejs/react-splide/pull/85 this fixes it

raviverma2791747 avatar Mar 05 '25 14:03 raviverma2791747