Excel上传出错:TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string or an instance of Buffer or URL.

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined       
      at Object.open (fs.js:465:10)
      at _openReadFs (internal/fs/streams.js:121:15)
      at new ReadStream (internal/fs/streams.js:98:5)
      at Object.createReadStream (fs.js:2075:10)

解决办法:

file.path 改为 file.filepath ,错误解决

Excel上传出错:TypeError [ERR_INVALID_ARG_TYPE]: The “path“ argument must be of type string or an instan_excel