This throws an error unexpected end of file.
fs.readFile(__dirname + '/' + filename, function (err, data) {
if (err) throw err;
console.log(data);
});
This is a oneline file created by:
fs.writeFile(__dirname + '/' + filename, JSON.stringify(data));
The file exists and the permissions are fine. Whats wrong?
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en