-
-
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
Broken :nth-child selector #2542
Comments
I am unable to replicate this: import { load } from 'cheerio';
console.log(load('<p>1<p>2')('p:nth-child(2)').text()); // 2 You likely have old package versions installed and running a |
Clear npm cache, create new folder, init npm, set "type": "module" in package.json, next "npm i cheerio" I installed cheerio a half an hour ago, this was the first install on my laptop |
I am able to replicate now. Turns out a default import to |
Bumping @harimambura Thank you for the report! |
In last version ([1.0.0-rc.11]) selector with :nth-child(n) throws an error "Uncaught TypeError TypeError: getNCheck is not a function", but previous version works fine.
I use the esm package if it matters
The text was updated successfully, but these errors were encountered: