epfromer / pst-extractor

Extract objects from MS Outlook/Exchange PST files
59 stars 18 forks source link

Error when running example #21

Closed amirgholami closed 2 years ago

amirgholami commented 3 years ago

Hi,

First thanks for creating this open source library. I am getting the following error when running the example code:

npm start

pst-extractor-example@1.1.0 start /scratch/amir/pst-extractor/example ts-node test-min.ts

PATH/pst-extractor/example/node_modules/ts-node/src/index.ts:513 return new TSError(diagnosticText, diagnosticCodes) ^ TSError: ⨯ Unable to compile TypeScript: test-min.ts:4:17 - error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try npm i --save-dev @types/node and then add 'node' to the types field in your tsconfig.

4 const resolve = require('path').resolve

I tried adding type: ["node"] to tsconfig file but I still keep getting this error. Have you seen this error before?

Thanks,