DEV Community


Discussion on: Build Desktop apps with the power of Angular

mariofraissdigital profile image
Mario Fraiss

Hi Ahmed,

First of all thank you for the example you put together. Nevertheless i get an compile error, when starting it with "npm run electron" right after the step where you modify the package.json

You add

"main" : "bin/main.js",
"scripts": {
“electron”: “tsc bin/main.ts && ng build && electron bin/main.js”

to the package.json, and that leads to a compile error:

error TS2583: Cannot find name 'Map'

After some digging I found the solution [1] to the problem.

If you add the following script:
“electron”: “tsc bin/main.ts && ng build && electron bin/main.js”

this leads to the fact, that the type-script compiler does not as intented. When calling tsc with a file-name parameter, then it ignores the tsconfig.json, therefore we have to add the following to the script:

“electron”: “tsc && ng build && electron bin/main.js”

et voila, problems solved.

Thank you for the post!

[1] for reference:

akaahmedkamal profile image
Ahmed Kamal Author

Ftf, sorry for not replying earlier, thanks for noting out this issue, I'll review my post and update it if needed, also you're very welcome to contribute for the Github repo if you see any fixes or updates.