Search code examples
javascriptnode.jshyperterminal

Why fs.copyFile is not working in Nodejs terminal?


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?


Solution

  • You need to use fs.copyFileSync