Passionated networker & entrepreneur, developer, speaker & author, technology enthusiast. Always open for a chat or discussion | CEO @fraiss.com - Austria & CTO in various companies
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”
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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: github.com/Microsoft/TypeScript/is...
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.