How does Node read Stream?

  node.js, question

For example, I have now received oneFileStream { ...This file stream is now to be saved as a file, so I used itfs, assumingstreamThe variable is the file stream:

const fs = require('fs')
 const filepath = fs.createWriteStream('files/x.xlsx')

The final result I got was:

nodejs.TypeError: path must be a string or Buffer

Found herefsThecreateReadStreamThe method cannot directly read the file stream, but no other method has been found. Is there any way for Node to read the file stream?

const fs = require('fs')
 const path = require('path')
 const readFilePath = path.join(__diranme, 'file/x.xlsx')
 const writeFilePath = path.join(__diranme, 'file/x_copy.xlsx')
 const writeStream = fs.createWriteStream(writeFilePath)
 const readStream = fs.createReadStream(readFilePath)

This is done by streamingx.xlsxCopy intox_copy.xlsx