Egret's compilation capabilities depend on the typescript's compilation capabilities. In fact, the typescript compilation process is not a traditional process of translating program source code into a two-level file that can be executed by a machine. Because browsers can recognize that the script that executes is only JavaScript, Typescript's compilation simply translates typescript into a corresponding JavaScript script.
We don't need to understand the complexity of the process, we can just interpret the compilation process as translating typescript into JavaScript code that can be executed by the browser.
This "translation" process is also very simple. We just need to execute a simple command. The order is as follows:
Egret Build HelloWorld
Where the Egret build is performing "translation" work, and HelloWorld is our project name.
The execution time of the command depends on the size of your project, and usually when you run a compilation script, the compiler will soon be able to help you compile your game logic.
When the compilation command completes, the terminal automatically jumps to the next line, and if the command fails, the compiler will give you a very detailed error message.
About this part of the error, we will be in the Debug run section for you to explain in detail.