We need to ensure that all the error checking that is currently done in the pascal-based package compiler is replicated in the typescript version.
[x] Note: ts-based package compiler needs to have significant additional work on it, as we do not currently emit any warnings or errors. Suggest bundling this error into that work.
See #8657
e.g. this should be a friendly error message (17.0.89-alpha):
```
C:\Projects\keymanapp\keyboards\release\k\khmer_angkor\source>kmc build khmer_angkor.kps
Building khmer_angkor.kps
Error: ENOENT: no such file or directory, open 'C:\Projects\keymanapp\keyboards\release\k\khmer_angkor\build\khmer_angkor.js'
at Object.openSync (node:fs:601:3)
at Module.readFileSync (node:fs:469:35)
at file:///C:/Users/mcdurdin/AppData/Roaming/npm/node_modules/@keymanapp/kmc/node_modules/@keymanapp/kmc-package/build/src/kmp-compiler.js:222:27
at Array.forEach ()
at KmpCompiler.buildKmpFile (file:///C:/Users/mcdurdin/AppData/Roaming/npm/node_modules/@keymanapp/kmc/node_modules/@keymanapp/kmc-package/build/src/kmp-compiler.js:198:20)
at BuildPackage.build (file:///C:/Users/mcdurdin/AppData/Roaming/npm/node_modules/@keymanapp/kmc/build/src/activities/BuildPackage.js:19:38)
at build (file:///C:/Users/mcdurdin/AppData/Roaming/npm/node_modules/@keymanapp/kmc/build/src/commands/build.js:38:26)
at Command. (file:///C:/Users/mcdurdin/AppData/Roaming/npm/node_modules/@keymanapp/kmc/build/src/commands/build.js:18:20)
at Command.listener [as _actionHandler] (C:\Users\mcdurdin\AppData\Roaming\npm\node_modules\@keymanapp\kmc\node_modules\commander\lib\command.js:482:17)
at C:\Users\mcdurdin\AppData\Roaming\npm\node_modules\@keymanapp\kmc\node_modules\commander\lib\command.js:1283:65 {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'C:\\Projects\\keymanapp\\keyboards\\release\\k\\khmer_angkor\\build\\khmer_angkor.js'
}
```
See #8659
```
AssertionError: expected [Function] to not throw an error but 'TypeError: Cannot read properties of undefined (reading \'executeProgram\')' was thrown
```
Note: executeProgram should be optional (all of Options key is optional)
Marking this as done. #7353 is mostly around regression-testing the new compiler, which will come later. All other hints and warnings have been implemented.
We need to ensure that all the error checking that is currently done in the pascal-based package compiler is replicated in the typescript version.
Originally posted by @mcdurdin in https://github.com/keymanapp/keyman/issues/8119#issuecomment-1413295606