Skip to content

since facing "ENOENT: no such file or directory, open 'node:stream'" issue #1260

@nehaAgarwalext

Description

@nehaAgarwalext

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch parse5-parser-stream@7.1.2 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/parse5-parser-stream/dist/cjs/index.js b/node_modules/parse5-parser-stream/dist/cjs/index.js
index a5002be..4e9a5fd 100644
--- a/node_modules/parse5-parser-stream/dist/cjs/index.js
+++ b/node_modules/parse5-parser-stream/dist/cjs/index.js
@@ -1,7 +1,7 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.ParserStream = void 0;
-const node_stream_1 = require("node:stream");
+const { Readable } = require('stream');
 const parse5_1 = require("parse5");
 /* eslint-disable unicorn/consistent-function-scoping -- The rule seems to be broken here. */
 /**

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions