Friday, April 22, 2016

[Node.js] Error: EISDIR, illegal operation on a directory at Error (native)


fs.js:552  var r =, buffer, offset, length, position);                  ^Error: EISDIR, illegal operation on a directory    at Error (native)    at Object.fs.readSync (fs.js:552:19)    at Object.fs.readFileSync (fs.js:384:28)    at /usr/eyeball/auth_server/js/server.js:98:15    at Socket.<anonymous> (/usr/eyeball/auth_server/js/util/process.js:11:5)    at Socket.emit (events.js:129:20)    at _stream_readable.js:908:16    at process._tickCallback (node.js:355:11)

This error happen when you use invalid file path for opening and reading using nodejs dependency library fs. 


File must be the file path with the file name. Not the file directory.

No comments:

Post a Comment