HiraokaHyperTools / msgreader

35 stars 9 forks source link

MsgReader is not a constructor #31

Closed nandolopez closed 1 year ago

nandolopez commented 2 years ago

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)

kenjiuno commented 2 years ago

Hi, could you try adding .default on require?

const MsgReader = require('@kenjiuno/msgreader').default;
github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

PedroS5499 commented 3 days ago

keep happening