I am trying to use Node's fs library to copy a file in one folder into another folder,
But I'm getting an error of ENOENT: no such file or directory,
But the file is definitely there.
My code is as follows -
let fs = require('fs');
let util = require('util');
let copyFile = async() => {
try {
let fsCopyFile = util.promisify(fs.copyFile).bind(fs);
let files = await fsCopyFile('/Users/aniruddhanarendraraje/Documents/work/pocs/node-crud-app/snippets/sharp/enhancedTest.jpg','/Users/aniruddhanarendraraje/Documents/work/pocs/node-crud-app/snippets/sharp2/enhancedTest.jpg');
} catch (error) {
console.error(error);
}
};
copyFile();
Error -
I also tried -
fsCopyFile('./sharp/enhancedTest.jpg','./sharp2/enhancedTest.jpg');
But I'm getting the same error


await fsCopyFile('./sharp/enhancedTest.jpg','./sharp2/enhancedTest.jpg');same error