Closed nandolopez closed 1 year ago
Hi, could you try adding .default
on require?
const MsgReader = require('@kenjiuno/msgreader').default;
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
keep happening
When I try to use the library with pure node (no frameworks. I have the following error:
const Reader = new MsgReader(msgFileBuffer) ^
TypeError: MsgReader is not a constructor
Do you have any idea or could you fix it?:
My code: const msgFileBuffer = fs.readFileSync(FileToAnalyze) const Reader = new MsgReader(msgFileBuffer) const Data = Reader.getFileData() console.log(Data.subject)