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

[BUG] Usage and build fails because of cheerio and missing types #164

Open
svrnm opened this issue Sep 16, 2024 · 3 comments
Open

[BUG] Usage and build fails because of cheerio and missing types #164

svrnm opened this issue Sep 16, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@svrnm
Copy link

svrnm commented Sep 16, 2024

Describe the bug
I was trying out doctor and couldn't get it to work, because it always threw an error Error: Cannot find module 'node:stream', after doing some digging it seems that this issue is related to cheerio 1.0.0 (cheeriojs/cheerio#4012) which gets installed based on the current version selector for cheerio (^1.0.0-rc.12 will also pick 1.0.0), so I wanted to build a version with the rc.12, there I got a few more errors of type Cannot find type definition file, which are caused by some typescript definitions missing

To Reproduce
Follow the instructions to get started with doctor to reproduce the first error.
Then pull the repository, run npm install and npm start to reproduce the second

Expected behavior
Successfully build and run doctor

Additional context

+    "@types/mdast": "^4.0.4",
+    "@types/normalize-package-data": "^2.4.4",
+    "@types/shimmer": "^1.2.0",
     "applicationinsights": "1.8.10",
     "arg": "4.1.3",
-    "cheerio": "^1.0.0-rc.12",
+    "cheerio": "1.0.0-rc.12",
@svrnm svrnm added the bug Something isn't working label Sep 16, 2024
@estruyf
Copy link
Owner

estruyf commented Oct 10, 2024

Thanks, @svrnm, for opening this issue. It would be best to update some/most of the dependencies to make it all work again.

estruyf added a commit that referenced this issue Oct 11, 2024
@estruyf
Copy link
Owner

estruyf commented Oct 11, 2024

Hi @svrnm it seems there are a lot of issues with v1 of cheerio, and like your suggestion, it is better to stick with r12 for a while. I did the change, which you can test out in the beta version @estruyf/[email protected]. Can you give this a try?

@svrnm
Copy link
Author

svrnm commented Oct 11, 2024

@estruyf it works now, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants