2017-02-21 24 views
7

Tôi không thể xây dựng ứng dụng ionic 2 của mình. Phục vụ công trình sau khi thay đổi tệp.Ionic 2 build dev failed: Kích thước ngăn xếp cuộc gọi tối đa vượt quá

On phục vụ ion, tôi nhận được thông báo lỗi sau:

[07:36:10] ionic-app-scripts 1.0.0 
[07:36:10] watch started ... 
[07:36:10] build dev started ... 
[07:36:10] clean started ... 
[07:36:10] clean finished in 1 ms 
[07:36:10] copy started ... 
[07:36:10] transpile started ... 
[07:36:15] build dev failed: Maximum call stack size exceeded 
[07:36:15] dev server running: http://localhost:8100/ 

Sau đó, khi tôi thay đổi một * .ts nộp các ứng dụng được xây dựng và có thể được sử dụng

[07:37:32] build started ... 
[07:37:32] transpile started ... 
[07:37:39] build finished in 6.81 s 

Khi tôi chạy ion xây dựng được thông báo lỗi sau đây được hiển thị:

[07:40:40] transpile started ... 
[07:40:44] build dev failed: Maximum call stack size exceeded 
[07:40:44] ionic-app-script task: "build" 
[07:40:44] RangeError: Maximum call stack size exceeded 
RangeError: Maximum call stack size exceeded 
    at Object.binarySearch (/Users/huli/Documents/leseschlauapp/node_modules/typescript/lib/typescript.js:1327:26) 
    at computeLineAndCharacterOfPosition (/Users/huli/Documents/leseschlauapp/node_modules/typescript/lib/typescript.js:4070:29) 
    at Object.getLineAndCharacterOfPosition (/Users/huli/Documents/leseschlauapp/node_modules/typescript/lib/typescript.js:4089:16) 
    at emitPos (*/node_modules/typescript/lib/typescript.js:35556:36) 
    at emitStart (*/node_modules/typescript/lib/typescript.js:35598:13) 
    at emitNodeWithSourceMap (*/node_modules/typescript/lib/typescript.js:44266:21) 
    at emitNodeConsideringCommentsOption (*/node_modules/typescript/lib/typescript.js:44258:21) 
    at emit (*/node_modules/typescript/lib/typescript.js:44240:17) 
    at emitPropertyAccess (*/node_modules/typescript/lib/typescript.js:39200:17) 
    at emitJavaScriptWorker (*/node_modules/typescript/lib/typescript.js:44393:32) 

npm ERR! Darwin 16.1.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "ionic:build" "--" 
npm ERR! node v7.4.0 
npm ERR! npm v4.0.5 
npm ERR! code ELIFECYCLE 
npm ERR! ionic-hello-world@ ionic:build: `ionic-app-scripts build` 
npm ERR! Exit status 1 

đây là package.json tôi nếu điều này có thể giúp

{ 
    "name": "ionic-hello-world", 
    "author": "Ionic Framework", 
    "homepage": "http://ionicframework.com/", 
    "private": true, 
    "scripts": { 
    "ionic:build": "ionic-app-scripts build", 
    "ionic:serve": "ionic-app-scripts serve" 
    }, 
    "dependencies": { 
    "@angular/common": "2.2.1", 
    "@angular/compiler": "2.2.1", 
    "@angular/compiler-cli": "2.2.1", 
    "@angular/core": "2.2.1", 
    "@angular/forms": "2.2.1", 
    "@angular/http": "2.2.1", 
    "@angular/platform-browser": "2.2.1", 
    "@angular/platform-browser-dynamic": "2.2.1", 
    "@angular/platform-server": "2.2.1", 
    "@ionic/storage": "1.1.7", 
    "dragula": "^3.7.2", 
    "ionic-angular": "2.0.0", 
    "ionic-native": "2.2.11", 
    "ionicons": "3.0.0", 
    "ng2-dragula": "^1.2.2-0", 
    "rxjs": "5.0.0-beta.12", 
    "zone.js": "0.6.26" 
    }, 
    "devDependencies": { 
    "@ionic/app-scripts": "1.0.0", 
    "typescript": "2.0.9" 
    }, 
    "cordovaPlugins": [ 
    "cordova-plugin-whitelist", 
    "cordova-plugin-statusbar", 
    "cordova-plugin-console", 
    "cordova-plugin-device", 
    "cordova-plugin-splashscreen", 
    "ionic-plugin-keyboard" 
    ], 
    "cordovaPlatforms": [ 
    "ios", 
    { 
     "platform": "ios", 
     "version": "", 
     "locator": "ios" 
    } 
    ], 
    "description": "leseschlauapp: An Ionic project" 
} 
+0

có vẻ như một số vấn đề phụ thuộc theo chu kỳ, mà gây ra một cái gì đó để chạy trong vòng lặp vô hạn, bạn sẽ phải cung cấp đầy đủ codebase, tạo ra một plunkr làm việc hoặc một cái gì đó. Sự cố này thường xảy ra trong quá trình rút gọn. –

+0

Bạn đã thay đổi điều gì gây ra vấn đề này? – WithoutBrain1994

+0

Vấn đề là, nó xảy ra trên ionic phục vụ, cũng như trên xây dựng. Nhưng trên phục vụ nó chỉ bao giờ xảy ra und khởi động, không phải trong khi tải lại nóng. Thật không may tôi nhận ra vấn đề cách quá muộn, và bây giờ có thể không tái sản xuất những gì giới thiệu nó – Thargor

Trả lời

3

có vẻ là một lỗi đánh máy transpiler

https://github.com/Microsoft/TypeScript/issues/2997

Rõ ràng có thể xảy ra vào những thứ như thế này séc

public parent: Module | Class;

cho ví dụ cách dùng loại công đoàn, hoặc nâng cấp nguyên cảo của bạn lên phiên bản mới hơn như 2.4. *

Các vấn đề liên quan