/Users/testing/node-v12.13.1-darwin-x64/bin/node --experimental-modules test.mjs
(node:4149) ExperimentalWarning: The ESM module loader is experimental.
internal/modules/esm/default_resolve.js:84
let url = moduleWrapResolve(specifier, parentURL);
^
Hi, thanks for the library, I tried to run the test.ts, but got some errors, first of all, my node version is
v12.13.1, but got a couple of errors, like:
import * as fs from 'fs';
^^^^^^
SyntaxError: Cannot use import statement outside a module, then I changed test.ts to test.mjs, and added --experimental-modules, then I got another error:
function processFolder(folder: PSTFolder) {
^
SyntaxError: Unexpected token ':'
so I changed the function to:
function processFolder(folder) {
also changed other similar things by removing : PSTMessage, :string, ...
function doSaveToFS(msg: PSTMessage, emailFolder: string, sender: string, recipients: string) {
now finally I got the following error:
Error: Cannot find module /Users/testing/Downloads/pst-extractor-1.5.0/src/PSTAttachment/PSTAttachment.class imported from /Users/testing/Downloads/pst-extractor-1.5.0/src/test.mjs
at Loader.resolve [as _resolve] (internal/modules/esm/default_resolve.js:84:13)
at Loader.resolve (internal/modules/esm/loader.js:73:33)
at Loader.getModuleJob (internal/modules/esm/loader.js:147:40)
at ModuleWrap. (internal/modules/esm/module_job.js:41:40)
at link (internal/modules/esm/module_job.js:40:36) {
code: 'ERR_MODULE_NOT_FOUND'
/Users/testing/node-v12.13.1-darwin-x64/bin/node --experimental-modules test.mjs (node:4149) ExperimentalWarning: The ESM module loader is experimental. internal/modules/esm/default_resolve.js:84 let url = moduleWrapResolve(specifier, parentURL); ^
Hi, thanks for the library, I tried to run the test.ts, but got some errors, first of all, my node version is v12.13.1, but got a couple of errors, like: import * as fs from 'fs'; ^^^^^^ SyntaxError: Cannot use import statement outside a module, then I changed test.ts to test.mjs, and added --experimental-modules, then I got another error: function processFolder(folder: PSTFolder) { ^ SyntaxError: Unexpected token ':'
so I changed the function to: function processFolder(folder) { also changed other similar things by removing : PSTMessage, :string, ... function doSaveToFS(msg: PSTMessage, emailFolder: string, sender: string, recipients: string) {
now finally I got the following error:
Error: Cannot find module /Users/testing/Downloads/pst-extractor-1.5.0/src/PSTAttachment/PSTAttachment.class imported from /Users/testing/Downloads/pst-extractor-1.5.0/src/test.mjs at Loader.resolve [as _resolve] (internal/modules/esm/default_resolve.js:84:13) at Loader.resolve (internal/modules/esm/loader.js:73:33) at Loader.getModuleJob (internal/modules/esm/loader.js:147:40) at ModuleWrap. (internal/modules/esm/module_job.js:41:40)
at link (internal/modules/esm/module_job.js:40:36) {
code: 'ERR_MODULE_NOT_FOUND'
Any clues?
Thanks