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

Typescript build fails #1990

Open
urmaul opened this issue Oct 18, 2023 · 9 comments
Open

Typescript build fails #1990

urmaul opened this issue Oct 18, 2023 · 9 comments

Comments

@urmaul
Copy link
Contributor

urmaul commented Oct 18, 2023

With megalodon version 8.1.5 in dependencies the typescript build fails with the error:

node_modules/megalodon/lib/src/firefish/web_socket.d.ts:2:23 - error TS2688: Cannot find type definition file for 'ws'.

2 /// <reference types="ws" />
                        ~~

node_modules/megalodon/lib/src/mastodon/web_socket.d.ts:2:23 - error TS2688: Cannot find type definition file for 'ws'.

2 /// <reference types="ws" />
                        ~~

node_modules/megalodon/lib/src/pleroma/web_socket.d.ts:2:23 - error TS2688: Cannot find type definition file for 'ws'.

2 /// <reference types="ws" />
                        ~~
@urmaul
Copy link
Contributor Author

urmaul commented Oct 18, 2023

Seems related to #1971

@h3poteto
Copy link
Owner

@teabroker Can you please check this?

@urmaul
Copy link
Contributor Author

urmaul commented Oct 19, 2023

Example of the failing build: urmaul/toot-feed-bot#276

@h3poteto
Copy link
Owner

@urmaul Can you please try 8.1.6?

@urmaul
Copy link
Contributor Author

urmaul commented Oct 19, 2023

It works well with 8.1.6

@teabroker
Copy link
Contributor

teabroker commented Oct 19, 2023

I've checked this. It seems like my intention to remove types-only dependency from the dependencies to left only javascript's related was incorrect. So the library works well, when it is a single project and doesn't work when it's a dependency itself.

I think it's a reason to check it automatically. Need to think how.

@h3poteto you've rolled back too much. Now the typescript module is back to regular dependencies. I'm going to move typescript to devDependencies and left the types as it is in the 8.1.6 version.

@teabroker
Copy link
Contributor

I've made a correction for PR #1971.

@teabroker
Copy link
Contributor

This bug will affect only TS packages. But it seems reasonable to deprecate 8.1.5 version to prevent others from using it by occasion. Now it's still available for downloading without a notice at NPM registry.

@teabroker
Copy link
Contributor

Well, I've checked this and it seems like there is only one type-dependency is in use. It's @types/ws and I think it's actually could be removed after few changes. But I've also found several potentially redundant type-dependencies and going to create a separate issue for the cleanup.

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