Why fs.copyFile is not working in Nodejs terminal?

337 Views Asked by At

error screenshot along with code snippet I am trying to copy content from one file to another but the hyperterminal throws error. I have no idea. Could you help?

I have entered the syntax for copyFile but it is not working ?whether it is because of version or something else?

1

There are 1 best solutions below

0
On BEST ANSWER

You need to use fs.copyFileSync