minio-js
minio-js copied to clipboard
TS error "An import path can only end with a '.ts' extension."
Hello,
I've the same problem as in #1173.
This is my configuration :
- minio :
8.0.2 - ts :
5.1.3 - node :
18.19.1
And my tsconfig :
As I investigate, the error come from the import import { UploadedObjectInfo } from 'minio/src/internal/type'.
When I used the import import { UploadedObjectInfo } from 'minio/dist/main/internal/type' the error disappear. I don't know if it is possible to indicate the expected behavior, because my IDE imported from minio/src/internal/type automaticly.
What is your typescript version ?
It is 5.1.3 (I mentionned it in the description)
Same case for me!
workaround: I can solve by giving the complete path to types:
import type { UploadedObjectInfo } from "minio/dist/main/internal/type";