Skip to content
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

process is not defined #540

Open
sandeepworks25 opened this issue Sep 19, 2024 · 2 comments
Open

process is not defined #540

sandeepworks25 opened this issue Sep 19, 2024 · 2 comments

Comments

@sandeepworks25
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js
index df1f608..8d8a808 100644
--- a/node_modules/readable-stream/lib/_stream_readable.js
+++ b/node_modules/readable-stream/lib/_stream_readable.js
@@ -487,7 +487,7 @@ function emitReadable(stream) {
   if (!state.emittedReadable) {
     debug('emitReadable', state.flowing);
     state.emittedReadable = true;
-    process.nextTick(emitReadable_, stream);
+    setTimeout(() => emitReadable_(stream), 0);
   }
 }
 function emitReadable_(stream) {

This issue body was partially generated by patch-package.

@WasabiThumb
Copy link

Could this be related to #539? Both are caused by the attempt to use process.nextTick, though in your case it seems that process is completely undefined.

@scholtz
Copy link

scholtz commented Oct 21, 2024

in vue3 app the process is undefined as well.. please do not use the process variable at all or revert it to the version where it used to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants