Node.JS crash when starting resource

I have a new clean project in which I created a resource in TypeScript called hello-world. I start the server and then try to launch the resource by right-clicking on it and clicking Start. At this moment, I get an error that Node.JS has stopped working. Here is a log fragment with the error. I don’t know how to handle this, except for FxDK, Node works perfectly fine.


[    235375] [         FiveM]      UV loop: svMain/ [GameServerFxdkMode] [FXSERVER STDOUT] 0me[0mStarting resource: "hello-world"
[    235375] [         FiveM]      UV loop: svMain/
[    235375] [         FiveM]      UV loop: svMain/ [GameServerFxdkMode] [FXSERVER STDOUT] e[38;5;73m[ citizen-server-imp
[    235375] [         FiveM]      UV loop: svMain/ [GameServerFxdkMode] [FXSERVER STDOUT] l] e[0me[0mRunning build tasks on resource hello-world - it'll restart once completed.
[    235375] [         FiveM]      UV loop: svMain/ 
[    235391] [         FiveM]      UV loop: svMain/ ^3Warning: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:^7
[    235391] [         FiveM]      UV loop: svMain/ ^1Error: Error: Failed to start hello-world as it is not loaded
[    235391] [         FiveM]      UV loop: svMain/     at fc.startResource (C:\Users\kryst\AppData\Local\FiveM\FiveM.app\citizen\sdk\sdk-root\shell\build_server\index.js:2:830860)
[    235391] [         FiveM]      UV loop: svMain/     at processTicksAndRejections (node:internal/process/task_queues:96:5)^7
[    235391] [         FiveM]      UV loop: svMain/ UNHANDLED REJECTION Error: Failed to start hello-world as it is not loaded
[    235391] [         FiveM]      UV loop: svMain/     at fc.startResource (C:\Users\kryst\AppData\Local\FiveM\FiveM.app\citizen\sdk\sdk-root\shell\build_server\index.js:2:830860)
[    235391] [         FiveM]      UV loop: svMain/     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[    235406] [         FiveM]      UV loop: svMain/ Error: Node.js exiting (exit code -1)
[    235422] [         FiveM]      UV loop: svMain/ See console for details

hello, I have had this same issue before, but I have noticed most of the time if you enable the script instead of starting it, it almost always works.

I second that, also, I recommend looking into the basics of NodeJS, NPM and ES6 features. Good luck on your development journey!