const valid_filename_1 = require("valid-filename");
^
Error [ERR_REQUIRE_ESM]: require() of ES Module ***\node_modules\valid-filename\index.js from ***\dist\accounts.js not supported.
Instead change the require of index.js in ***\dist\accounts.js to a dynamic import() which is available in all CommonJS modules.
{
"compilerOptions": {
"module": "commonjs",
"target": "ESNEXT",
"sourceMap": true,
"outDir": "./dist",
"moduleResolution": "node",
"removeComments": true,
"strict": true,
"strictPropertyInitialization": true,
"alwaysStrict": true,
"noUnusedLocals": false, /* Report errors on unused locals. */
"noUnusedParameters": false, /* Report errors on unused parameters. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
"skipLibCheck": true
},
"exclude": [
"**/*.d.ts", // prevent d.ts overwrite error
"**/repository", // prevent d.ts overwrite error
"dist",
"node_modules"
]
}