Answer the question
In order to leave comments, you need to log in
Error while trying to read nodejs fs file?
I'm trying to read a file using fs:
fs.readFile('./cases.json', 'utf8', (err, data) => {
if (err) {
console.log(`Error reading file from disk: ${err}`);
} else {
console.log('НАКОНЕЦ')
}
});
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type
string or an instance of Buffer or URL. Received an instance of Array
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