The Typescript compiler is kicking back my index.ts with the following errors:
index.ts:13:34 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'.
13 const __filename = fileURLToPath(import.meta.url);
~~~~~~~~~~~
index.ts:19:16 - error TS2350: Only a void function can be called with the 'new' keyword.
19 const upload = new multer({ storage: multer.memoryStorage() })
I made the change to tsconfig.json. The tsconfig and my current code are listed below. I'm unsure what is causing these errors. If anyone needs any more information, please let me know.
"compilerOptions": {
/* Basic Options */
"target": "es5",
"module": "es2020",
/* Strict Type-Checking Options */
"strict": true,
/* Module Resolution Options */
"esModuleInterop": true,
/* Advanced Options */
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}