I am developing an Electron + Angular application. I have decided to incorporate Typescript for my Electron component, so I created a main.ts file and attempted to compile it to main.js using the 'tsc main.ts' command. Unfortunately, I encountered the following error:
node_modules/@types/selenium-webdriver/remote.d.ts:139:29 - error TS2304: Cannot find name 'Map'.
The compilation process still generated the main.js file successfully and I can run Electron without any issues, but I would prefer to have a single script that runs without any errors.
In my tsconfig.json file, I have specified the following configuration:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
I have experimented with different combinations of target and lib configurations (such as es6) but have not been successful in resolving the issue.
If anyone could provide assistance, it would be greatly appreciated. Thank you!