-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
rc.4 and rc.5 crash on a script that works in rc.3 #1679
Comments
yes, it seems like in |
Cheerio should be able handle it, but I would suggest change code so document will be parsed with ...
const root = $.load(specHTML);
let aOps = root('[aoid]');
if (aOps.length === 0) {
aOps = root('p:contains(" abstract operation ")').closest('section').add(root('#sec-reference-specification-type > section'));
}
... |
What’s the advantage of that? |
This is how Cheerio is meant to work. Load document and then make requests against it. Current setup also should work, but it is clearly not enough tested. |
I expect cheerio to work just like jquery works :-) but thanks, appreciate the workaround. |
Thanks for the report! Quite unfortunate that this happened & thanks @5saviahv for stepping in! |
Thanks, with this and hopefully #1585 fixed, i'll be able to update to rc6 (or a regular v1) everywhere ;-) |
I have come across this issue as well after upgrading from
|
Hi @lsbyerley, what error are you seeing? |
@fb55 the same one posted by the OP..
|
The fix isn’t released yet, afaict |
alright no problem, i can downgrade until the release |
To repro:
npm install
npm install cheerio@1.0.0-rc.3
node operations/getOps 2020
, observe it completesnpm install cheerio@1.0.0-rc.4
(or 5)node operations/getOps 2020
, observe it crashes with:Since this is a dev-only script, I only need to use it in node 14 or higher.
The text was updated successfully, but these errors were encountered: