Nativescript with Angular build error


I have a NS application with Angular. Everything was running fine until my Mac crashed. I got a new one, clone the repository, ran through all the steps to setup my environment (from the NS site) and tried the run the app. However, I am getting the following error:

Processing node_modules failed. RangeError: Maximum call stack size exceeded

This happens with both iOS and Android. I have removed the platforms and added them again, reinstalled NS and all the tooling, but nothing helps. I am not sure if this is a NS, a Typescript, or an Angular error, but either way, I am out of ideas.

The weird thing is that the very same code worked fine on my old Mac.

Here is my package.json:

  "description": "My Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "My Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "",
    "tns-ios": {
      "version": "3.0.1"
    "tns-android": {
      "version": "3.0.1"
  "dependencies": {
    "@angular/animations": "~4.1.0",
    "@angular/common": "~4.1.0",
    "@angular/compiler": "~4.1.0",
    "@angular/core": "~4.1.0",
    "@angular/forms": "~4.1.0",
    "@angular/http": "~4.1.0",
    "@angular/platform-browser": "~4.1.0",
    "@angular/router": "~4.1.0",
    "@progress/nativescript-telerik-ui-pro": "^2.0.1",
    "nativescript": "^3.0.1",
    "nativescript-angular": "~3.0.0",
    "nativescript-appversion": "^1.4.1",
    "nativescript-loading-indicator": "^2.3.2",
    "nativescript-push-notifications": "^0.1.3",
    "nativescript-theme-core": "~1.0.2",
    "reflect-metadata": "~0.1.8",
    "rxjs": "~5.3.0",
    "tns-core-modules": "~3.0.0",
    "zone.js": "~0.8.2"
  "devDependencies": {
    "babel-traverse": "6.24.1",
    "babel-types": "6.24.1",
    "babylon": "6.17.1",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "~0.4.0",
    "tns-platform-declarations": "^3.0.1",
    "typescript": "~2.2.1"

Here is my tsconfig.ts

    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "noEmitHelpers": true,
        "noEmitOnError": true,
        "lib": [
        "baseUrl": ".",
        "paths": {
            "*": [
    "exclude": [

Any ideas are highly appreciated.

Thank you


I have just encountered the same error, did you manage to find why the call stack size exceeded ?