Skip to content
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

TS error "An import path can only end with a '.ts' extension." #1353

Open
Asiberus opened this issue Oct 30, 2024 · 4 comments
Open

TS error "An import path can only end with a '.ts' extension." #1353

Asiberus opened this issue Oct 30, 2024 · 4 comments

Comments

@Asiberus
Copy link

Asiberus commented Oct 30, 2024

Hello,

I've the same problem as in #1173.

image

This is my configuration :

  • minio : 8.0.2
  • ts : 5.1.3
  • node : 18.19.1

And my tsconfig :

image
@Asiberus Asiberus changed the title TS error "An import path cannot end with a '.ts' extension." TS error "An import path can only end with a '.ts' extension." Oct 30, 2024
@Asiberus
Copy link
Author

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.

@prakashsvmx
Copy link
Member

What is your typescript version ?

@Asiberus
Copy link
Author

It is 5.1.3 (I mentionned it in the description)

@lesmoutonssauvages
Copy link

lesmoutonssauvages commented Nov 8, 2024

Same case for me!

workaround: I can solve by giving the complete path to types:

import type { UploadedObjectInfo } from "minio/dist/main/internal/type";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants