Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

RangeError: Maximum call stack size exceeded in 1.2.2. #854

Closed
kleeb opened this issue Mar 28, 2017 · 7 comments
Closed

RangeError: Maximum call stack size exceeded in 1.2.2. #854

kleeb opened this issue Mar 28, 2017 · 7 comments

Comments

@kleeb
Copy link

kleeb commented Mar 28, 2017

Version 1.2.2.
Release bundle build (dev works correct, previous working 1.1.4).
Typescript 2.2.2.
Bundler: rollup

[13:54:20] rollup finished in 43.13 s
[13:54:20] sass started ...
[13:54:20] transpile bundle started ...
[13:54:42] ionic-app-script task: "build"
[13:54:42] RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
at getTypeAtFlowBranchLabel (ionic/node_modules/typescript/lib/typescript.js:33971:46)
at getTypeAtFlowNode (ionic/node_modules/typescript/lib/typescript.js:33843:29)
at getTypeAtFlowCondition (ionic/node_modules/typescript/lib/typescript.js:33937:32)
at getTypeAtFlowNode (ionic/node_modules/typescript/lib/typescript.js:33832:32)
at getTypeAtFlowBranchLabel (ionic/node_modules/typescript/lib/typescript.js:33983:36)
at getTypeAtFlowNode (ionic/node_modules/typescript/lib/typescript.js:33843:29)
at getTypeAtFlowCondition (ionic/node_modules/typescript/lib/typescript.js:33937:32)
at getTypeAtFlowNode (ionic/node_modules/typescript/lib/typescript.js:33832:32)
at getTypeAtFlowCondition (ionic/node_modules/typescript/lib/typescript.js:33937:32)
at getTypeAtFlowNode (ionic/node_modules/typescript/lib/typescript.js:33832:32)

@sfaizanh
Copy link

@kleeb i was stuck with this error for 2 weeks, go to your package.json and find

config: {
   ionic_rollup: './config.ts'
} 

remove it and try to build again, if you get success then try using webpack

@kleeb
Copy link
Author

kleeb commented Mar 28, 2017

I have a custom extended ionic_rollup config

@kleeb
Copy link
Author

kleeb commented Apr 3, 2017

any news on this one, anyone has this kind of problem with Typescript 2.2.x ?

@danbucholtz
Copy link
Contributor

danbucholtz commented Apr 5, 2017

Can't say that I've seen this one. Are you using Angular 4? Angular 2 does not support TS 2.2.

Thanks,
Dan

@kleeb
Copy link
Author

kleeb commented Apr 5, 2017

You are totally right Dan. Was just checking package.json on the main ionic repo, but didn't look at angular, which is already 4.0.0.

Will skip it for now and check it on ionic3 with TS2.2 and Angular4.

@kleeb
Copy link
Author

kleeb commented Apr 5, 2017

The same thing on ionic 3 with Angular 4 and TS 2.2.2
stacktrace

[ DEBUG! ]  bundle.modules: 1242  MEM: 1041.3MB 
[12:38:26]  rollup finished in 24.43 s MEM: 1471.2MB 
[12:38:26]  sass started ... MEM: 1471.2MB 
[ DEBUG! ]  sass outFile: /Users/kleeb/workspace/ionic/www/build/main.css  MEM: 1471.3MB 
[ DEBUG! ]  sass includePaths: 
            /Users/kleeb/workspace/ionic/src,node_modules/ionic-angular/themes,node_modules/ionicons/dist/scss,node_modules/ionic-angular/fonts
             MEM: 1471.3MB 
[ DEBUG! ]  sass moduleDirectories: 167  MEM: 1471.3MB 
[ DEBUG! ]  sass userSassVariableFiles: 1  MEM: 1471.3MB 
[ DEBUG! ]  sass componentSassFiles: 187  MEM: 1471.3MB 
[12:38:26]  transpile bundle started ... MEM: 1471.4MB 
[12:38:37]  ionic-app-script task: "build"  MEM: 1241.7MB
[12:38:37]  RangeError: Maximum call stack size exceeded  MEM: 1241.7MB
RangeError: Maximum call stack size exceeded
    at isMatchingReference (/Users/kleeb/workspace/ionic/node_modules/typescript/lib/typescript.js:33297:37)
    at getTypeAtFlowAssignment (/Users/kleeb/workspace/ionic/node_modules/typescript/lib/typescript.js:33881:21)
    at getTypeAtFlowNode (/Users/kleeb/workspace/ionic/node_modules/typescript/lib/typescript.js:33825:32)
    at getTypeAtFlowCondition (/Users/kleeb/workspace/ionic/node_modules/typescript/lib/typescript.js:33937:32)
    at getTypeAtFlowNode (/Users/kleeb/workspace/ionic/node_modules/typescript/lib/typescript.js:33832:32)
    at getTypeAtFlowCondition (/Users/kleeb/workspace/ionic/node_modules/typescript/lib/typescript.js:33937:32)
    at getTypeAtFlowNode (/Users/kleeb/workspace/ionic/node_modules/typescript/lib/typescript.js:33832:32)
    at getTypeAtFlowBranchLabel (/Users/kleeb/workspace/ionic/node_modules/typescript/lib/typescript.js:33983:36)
    at getTypeAtFlowNode (/Users/kleeb/workspace/ionic/node_modules/typescript/lib/typescript.js:33843:29)
    at getTypeAtFlowCondition (/Users/kleeb/workspace/ionic/node_modules/typescript/lib/typescript.js:33937:32)

package.json

  "dependencies": {
    "@angular/common": "4.0.0",
    "@angular/compiler": "4.0.0",
    "@angular/compiler-cli": "4.0.0",
    "@angular/core": "4.0.0",
    "@angular/forms": "4.0.0",
    "@angular/http": "4.0.0",
    "@angular/platform-browser": "4.0.0",
    "@angular/platform-browser-dynamic": "4.0.0",
    "@ionic-native/badge": "3.4.4",
    "@ionic-native/camera": "3.4.4",
    "@ionic-native/core": "3.4.4",
    "@ionic-native/device": "3.4.4",
    "@ionic-native/facebook": "3.4.4",
    "@ionic-native/geolocation": "3.4.4",
    "@ionic-native/google-analytics": "3.4.4",
    "@ionic-native/in-app-browser": "3.4.4",
    "@ionic-native/network": "3.4.4",
    "@ionic-native/push": "3.4.4",
    "@ionic-native/social-sharing": "3.4.4",
    "@ionic-native/splash-screen": "3.4.4",
    "@ionic-native/status-bar": "3.4.4",
    "@ionic/storage": "2.0.1",
    "angular2-uuid": "1.1.0",
    "angularfire2": "2.0.0-beta.8",
    "angularfire2-offline": "2.0.3",
    "firebase": "3.4.0",
    "ionic-angular": "3.0.0-beta.3",
    "ionicons": "3.0.0",
    "lodash": "4.17.4",
    "ng2-translate": "5.0.0",
    "raven-js": "3.12.1",
    "rxjs": "5.1.1",
    "sw-toolbox": "3.4.0",
    "ts-md5": "1.2.0",
    "zone.js": "0.8.4"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.2.5",
    "@types/googlemaps": "3.25.38",
    "@types/jasmine": "2.5.38",
    "@types/request": "0.0.36",
    "@types/lodash": "ts2.2",
    "ng2-facebook-sdk": "1.0.0",
    "typescript": "2.2.2"
  },

@kleeb
Copy link
Author

kleeb commented Apr 5, 2017

FIX:
add --stack-size=1968 to the first line of node_modules/@ionic/app-scripts/bin/ionic-app-scripts.js (or to be safe --max_old_space_size=4096 --stack-size=1968)

now it turned into another error #853

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants