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

Trouble with imports #4545

Closed
clickjamper opened this issue Nov 26, 2024 · 7 comments
Closed

Trouble with imports #4545

clickjamper opened this issue Nov 26, 2024 · 7 comments
Labels
X-Needs-Info This issue is blocked awaiting information from the reporter

Comments

@clickjamper
Copy link

I updated matrix-js-sdk from 33.1 to 34.12 and all of my imports was broken. I start explore problem, and it turned out it was related with #4377. After this issue in matrix.d.ts all imports with .ts. And I can't realize why they in my project looks with .ts. How can I fix it? I just want use you library

@richvdh
Copy link
Member

richvdh commented Nov 26, 2024

This isn't an actionable bug report. Please post some sample code demonstrating the problem.

@richvdh richvdh added X-Needs-Info This issue is blocked awaiting information from the reporter and removed A-Developer-Experience T-Defect labels Nov 26, 2024
@clickjamper
Copy link
Author

Снимок экрана от 2024-1
This error in my code

Снимок экрана от 2024-1124
And in lib within my node modules

If I delete .ts in lib it works

@clickjamper
Copy link
Author

import * as sdk from "matrix-js-sdk";
const { Room } = sdk;

Doesn't works too

@clickjamper
Copy link
Author

And I use pnpm to build the project

@clickjamper
Copy link
Author

clickjamper commented Nov 27, 2024

It was connected with ts version. Closed.

@richvdh
Copy link
Member

richvdh commented Nov 27, 2024

Glad you got it fixed. Could you share which version of tsc you were using before, and what version you found fixed it, as a helper for other people who might have the same problem?

Also: reminder that it's helpful if you paste the error messages themselves, rather than screenshots of the error, so that anyone searching for the error message will find your issue. In this case, the useful error messages seem to be:

TS2614: Module "matrix-js-sdk" has no exported member SearchOrderBy. Did you mean to use import SearchOrderBy from "matrix-js-sdk" instead?
TS2691: An import path cannot end with a .ts extension.

@clickjamper
Copy link
Author

clickjamper commented Nov 27, 2024

Glad you got it fixed. Could you share which version of tsc you were using before, and what version you found fixed it, as a helper for other people who might have the same problem?

Also: reminder that it's helpful if you paste the error messages themselves, rather than screenshots of the error, so that anyone searching for the error message will find your issue. In this case, the useful error messages seem to be:

TS2614: Module "matrix-js-sdk" has no exported member SearchOrderBy. Did you mean to use import SearchOrderBy from "matrix-js-sdk" instead?
TS2691: An import path cannot end with a .ts extension.

4.9.5 -> 5.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
X-Needs-Info This issue is blocked awaiting information from the reporter
Projects
None yet
Development

No branches or pull requests

2 participants