Unable to create HelloWorld app for the first time. (Android)


Hello! I’m trying step by step the tutorial from here: Running Apps

But I get same error below after do tns run android.


Error: read ECONNRESET
    at exports._errnoException (util.js:1022:11)
    at TCP.onread (net.js:569:26)
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
The system failed to delete the package for an unspecified reason.


I already done all the possible solution, including remove the node_modules and platform in project folder and run tns install / tns platform add android.

The emulator setting is same as the Setup Android Emulators (AVD) with RAM: 2048 VM Heap: 64

  • CLI Ver. 2.5.0
  • Cross platform modules: 2.5.0
  • Plugins: 2.5.0
  • Windows 10 x64

Thanks for your helps.


Example of the error:


The runtime error with the message you see in the Exception tab is a result of failed transpilation of some (all) TypeScript files.

That is a somewhat common problem in Angular apps where there are a lot of files that need to be transpiled, add into the equation a fair amount of typescript definitions with rules, and there you go, the Node process goes all Boom!!!

You could try to remove unnecessary typings from tsconfig.json, and if there’s nada that you think should be removed you should increase the node memory limit.



Hi Pete,

Can you please tell me which .js file that I should increase the memory?

I found this issue: https://github.com/NativeScript/nativescript-cli/issues/2168
It seems problem with the nativescript-dev-typescript file.
If true, I done it with node --max-old-space-size=8192 nativescript-dev-typescript.js inside the \hooks folder but its not working.

How about the first error?

Thanks for your helps.


Error: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TCP.onread (net.js:569:26)

To solve above error, all you need is to update NODE to version 7.10.0, and NPM to version 5.0.3
It worked for me.