You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const{ createReadStream }=require('fs')createReadStream('./package.json').on('open',()=>console.log('open1')).on('ready',()=>console.log('ready1'))require('graceful-fs')createReadStream('./package.json').on('open',()=>console.log('open2')).on('ready',()=>console.log('ready2'))setTimeout(()=>{},1000)// wait a second
output:
open1
ready1
open2
No ready2 output!
You can copy above code in node repl to reproduce.
And If you comment require('graceful-fs').ready2 is printed.
package version: 4.1.15
node version: 11.6.0
The text was updated successfully, but these errors were encountered:
Example:
output:
No
ready2
output!You can copy above code in node repl to reproduce.
And If you comment
require('graceful-fs')
.ready2
is printed.The text was updated successfully, but these errors were encountered: