cheerio 1.0.0 breaks bundling of react native
envgap__cheeriojs__cheerio-4032
01 / FAILURE SIGNATURE
As reported upstream
Error: Unable to resolve module node:stream from /home/runner/work/thu-info-app/thu-info-app/node_modules/cheerio/dist/commonjs/index.js: node:stream could not be found within the project or in these directories:
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
2dbe60e4286718594041574e8ab1c66c1e504db4- Manifest
package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
cheeriojs/cheerio #4032 · read the original issue
<!-- Thanks for your interest in cheerio!
Please note that issues should be primarily used for tracking bugs and feature requests.
If you have a more general question, please consider consulting StackOverflow first:
https://stackoverflow.com/questions/tagged/cheerio
If you think you uncovered a bug, please try to provide a minimal example that triggers the behavior.
Please note that we will not investigate issues that perform HTTP requests, as the source might already have changed.
-->
Minimal example: https://github.com/thu-info-community/thu-info-app/actions/runs/10414518614/job/28843638237?pr=587
```
Error: Unable to resolve module node:stream from /home/runner/work/thu-info-app/thu-info-app/node_modules/cheerio/dist/commonjs/index.js: node:stream could not be found within the project or in these directories:
../../node_modules
error Unable to resolve module node:stream from /home/runner/work/thu-info-app/thu-info-app/node_modules/cheerio/dist/commonjs/index.js: node:stream could not be found within the project or in these directories:
../../node_modules
node_modules
../../node_modules
49 | const undici = __importStar(require("undici"));
50 | const whatwg_mimetype_1 = __importDefault(require("whatwg-mimetype"));
> 51 | const node_stream_1 = require("node:stream");
| ^
52 | const options_js_1 = require("./options.js");
53 | const load_parse_js_1 = require("./load-parse.js");
54 | /**.
node_modules
../../node_modules
49 | const undici = __importStar(require("undici"));
50 | const whatwg_mimetype_1 = __importDefault(require("whatwg-mimetype"));
> 51 | const node_stream_1 = require("node:stream");
| ^
52 | const options_js_1 = require("./options.js");
53 | const load_parse_js_1 = require("./load-parse.js");
54 | /**
at ModuleResolver.resolveDependency (/home/runner/work/thu-info-app/thu-info-app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:153:15)
at DependencyGraph.resolveDependency (/home/runner/work/thu-info-app/thu-info-app/node_modules/metro/src/node-haste/DependencyGraph.js:279:43)
at /home/runner/work/thu-info-app/thu-info-app/node_modules/metro/src/lib/transformHelpers.js:176:21
at resolveDependencies (/home/runner/work/thu-info-app/thu-info-app/node_modules/metro/src/DeltaBundler/buildSubgraph.js:56:25)
at visit (/home/runner/work/thu-info-app/thu-info-app/node_modules/metro/src/DeltaBundler/buildSubgraph.js:107:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 2)
at async visit (/home/runner/work/thu-info-app/thu-info-app/node_modules/metro/src/DeltaBundler/buildSubgraph.js:116:5)
at async Promise.all (index 4)
at async visit (/home/runner/work/thu-info-app/thu-info-app/node_modules/metro/src/DeltaBundler/buildSubgraph.js:116:5)
```
Steps to reproduce:
- Create a react-native project
- Use cheerio@1.0.004 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]