Reputation: 1030
Im using the following code to write to a file
fs.writeFile('/dev/ttymxc1',"LED 1 ON",function(err){
if (err) return console.log(err);
});
and I get the error
{ [Error: ESPIPE, write] errno: -29, code: 'ESPIPE' }
I already googled it but I found nothing..
EDIT:
I think the reason this does not work it that I have to use
fs.createWriteStream();
instead of
fs.fileWrite();
Upvotes: 1
Views: 1120
Reputation: 1030
The Solution was using
fs.createWriteStream()
instead of
fs.fileWrite();
Upvotes: 1