Answer the question
In order to leave comments, you need to log in
Error in Node.js callback must be a function?
When calling this code in Node.js, an error occurs saying
TypeError [ERR_INVALID_CALLBACK] : Callback must be a function
, etc.
I don't understand what's the matter.
var fs = require('fs');
const format = require('node.date-time');
function logTime() {
return new Date().format('y-M-d H:M:S')+" ";
}
fs.appendFile('readme.log', logTime() + 'myText' + '\n');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question