Closed RaghavAgrawal-TUL-Luxury closed 2 months ago
In the 'master' branch, the version of cheerio package is changed to "=1.0.0-rc.3", which is not updated in the npm registry, so publishing this change should fix the issue for older projects using node < 18.17.0.
Meanwhile, the solution for this is to add the following in package.json:
For yarn:
"resolutions": { "cheerio": "1.0.0-rc.3" }
For npm:
"overrides": { "cheerio": "1.0.0-rc.3" }
Duplicate of #2558.
Why was this closed as "not planned"? Will there no longer be any fixes for this library?
@EJLearner it wasn't, it was closed as a duplicate. See the issue it duplicates, which is fixed, and the next release of enzyme will include it.
On Github, issues are closed when the fix lands, not when the fix is published.
Meanwhile, the solution for this is to add the following in package.json:
For yarn:
"resolutions": { "cheerio": "1.0.0-rc.3" }
For npm:
"overrides": { "cheerio": "1.0.0-rc.3" }
@RaghavAgrawal-TUL-Luxury But cheerio: 1..0.0.rc.3 (rc-release candidate not recommended for production so what is the fix for prod i dont want to upgrade node version so)
@hanamantk theres no other option, since rc3 is the last cheerio version that’s compatible with enzyme.
Currently, on npm registry Enzyme@3.11.0 dependencies look like this:
This caret(^) symbol which is updating the cheerio version for all users is breaking for our application.
Thanks for reporting an issue to us! We're glad you are using and invested in Enzyme. Before submitting, please read over our commonly reported issues to prevent duplicates!
All common issues
Notoriously common issues
If you haven't found any duplicated issues, please report it with your environment!
Current behavior
Expected behavior
Your environment
API
Version
Adapter