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

events.js:48 throw arguments[1]; // Unhandled 'error' event #641

Closed
vmrathod opened this issue Nov 14, 2011 · 1 comment
Closed

events.js:48 throw arguments[1]; // Unhandled 'error' event #641

vmrathod opened this issue Nov 14, 2011 · 1 comment

Comments

@vmrathod
Copy link

I have written below code in streamreader.js file.

var fs = require("fs");
var readStream;

try
{
readStream=fs.createReadStream("hello.txt");
readStream.on('data',function(data){
console.log(data);
});
readStream.on('end',function(){
console.load('file ended');
});
}
catch(err)
{
readStream.on('error',function()
{
console.log(err);
});
}

but when i try to run this file using >node streamreader.js
I am getting below error.

events.js:48
throw arguments[1]; // Unhandled 'error' even
^
Error: ENOENT, The operation completed successfully.
'hello.txt'

Can you help me to resolve this issue?

@3rd-Eden
Copy link
Contributor

This is not in any way related to Socket.IO, if you have issues post them at the node.js mailing list not here.

<3 Thanks.

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

2 participants