nerdyman / react-image-turntable

Display a set of images as a draggable 360 degree turntable.
https://githubbox.com/nerdyman/react-image-turntable/tree/main/example
MIT License
21 stars 1 forks source link

Type information can not be found #32

Closed mgrandrath closed 3 months ago

mgrandrath commented 4 months ago

When building the package the declaration file dist/index.d.mts is created. However package.json states "typings": "dist/index.d.ts" (code). Because of this mismatch (.mts vs .ts) TypeScript fails to find the type information and gives the error Cannot find module 'react-image-turntable' or its corresponding type declarations.

nerdyman commented 4 months ago

Whoops, thanks for raising this @mgrandrath. I'll publish a fix release to resolve this.

densekernel commented 3 months ago

This issue also occurs with react-scripts test:

 FAIL  src/App.test.js
  ● Test suite failed to run

    Cannot find module 'react-image-turntable' from 'src/App.js'

Component is imported like import { ReactImageTurntable } from "react-image-turntable";

nerdyman commented 3 months ago
image

This has been resolved in 3.1.2

https://arethetypeswrong.github.io/?p=react-image-turntable%403.1.2