Troubleshooting

This describes common pitfalls to which you can get during compilation or development, and how to solve them. These problems usually produce errors that are not so intuitive, so make sure you read this page.


Top
1.1 Is it safe to stop the compilation script?

Considering client side compilation, NO, it is NOT safe, it can leave the source codes half-replaced. That can be reverted with another script, but better not to do it.

Considering server side compilation, YES, it is safe, as replacement occurs only in build directory.


2.1 TypeError: Class extends value undefined is not a constructor or null

Steps preceeding this error:


Solution

This happens, because you have class A extending B, and in B you import class A by accident.


The diagram xml file can be downloaded here


2.2 Upon compiling, the added code does not propagate to final application (server or client) at all

Steps preceeding this error:

Solution

Delete build folder, and compile all again


This happens, because the compiled classes persist in build, and the dependencies. Moreover, because upon compiling, the compiled files that are no longer needed are not deleted.


Example:


2.3 Upon cleaning and compiling project, weird and insane errors start to emerge

Errors can be following:



Solution

The reason why this can happen if when you backup build directory to the src folder.
For example using:
mv build build_old
Then, the compile script will create new build directory, but tsc will try to compile all sources in build_old directory as well.

Remove the build_old directory or put it out from the src directory.