I have just gone upgraded my Ionic 2 app to Ionic 3, all of framework, Ionic native, and the CLI.
I now have the following setup…
"dependencies": {
"@angular/animations": "4.1.0",
"@angular/common": "4.1.0",
"@angular/compiler": "4.1.0",
"@angular/compiler-cli": "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/platform-browser-dynamic": "4.1.0",
"@ionic-native/app-version": "^3.8.0",
"@ionic-native/core": "3.6.1",
"@ionic-native/device": "^3.8.0",
"@ionic-native/file": "^3.7.0",
"@ionic-native/network": "^3.8.0",
"@ionic-native/social-sharing": "^3.7.0",
"@ionic-native/splash-screen": "3.6.1",
"@ionic-native/status-bar": "3.6.1",
"@ionic-native/toast": "^3.8.0",
"@ionic/storage": "2.0.1",
"c3": "git://github.com/masayuki0812/c3.git",
"ionic-angular": "3.2.1",
"ionicons": "3.0.0",
"js-logger": "^1.3.0",
"jslogger": "^1.0.3",
"jszip": "^3.1.3",
"lodash": "^4.17.4",
"moment": "^2.17.1",
"moment-duration-format": "^1.3.0",
"ng2-translate": "^5.0.0",
"rxjs": "5.1.1",
"semaphore-async-await": "^1.3.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.10"
},
"devDependencies": {
"@ionic/app-scripts": "1.3.7",
"@ionic/cli-plugin-ionic-angular": "1.0.0",
"@types/c3": "^0.4.38",
"@types/jasmine": "^2.5.42",
"@types/jszip": "0.0.32",
"@types/lodash": "^4.14.51",
"@types/moment-duration-format": "^1.3.1",
"@types/node": "^7.0.5",
"codecov": "^1.0.1",
"install": "^0.8.7",
"jasmine-core": "^2.5.2",
"jasmine-spec-reporter": "^3.2.0",
"karma": "^1.4.1",
"karma-chrome-launcher": "^2.0.0",
"karma-jasmine": "^1.1.0",
"karma-mocha-reporter": "^2.2.2",
"karma-remap-istanbul": "^0.6.0",
"ts-node": "^2.1.0",
"tslint": "^4.4.2",
"tslint-eslint-rules": "^3.3.0",
"typescript": "^2.2.1"
},
Now, if I build with the -prod
flag (it id fine without this), I get the following error…
[16:50:08] webpack started ...
Error: ./~/jszip/lib/index.js
Module build failed: RangeError: Maximum call stack size exceeded
at Object.forEachChild (D:\dev\myapp\node_modules\typescript\lib\typescript.js:14735:26)
at traverse (D:\dev\myapp\node_modules\typescript\lib\typescript.js:7271:31)
at Object.forEachReturnStatement (D:\dev\myapp\node_modules\typescript\lib\typescript.js:7251:16)
at checkAndAggregateReturnExpressionTypes (D:\dev\myapp\node_modules\typescript\lib\typescript.js:40055:16)
at getReturnTypeFromBody (D:\dev\myapp\node_modules\typescript\lib\typescript.js:39965:29)
at getReturnTypeOfSignature (D:\dev\myapp\node_modules\typescript\lib\typescript.js:31190:28)
at resolveNewExpression (D:\dev\myapp\node_modules\typescript\lib\typescript.js:39483:21)
at resolveSignature (D:\dev\myapp\node_modules\typescript\lib\typescript.js:39639:28)
at getResolvedSignature (D:\dev\myapp\node_modules\typescript\lib\typescript.js:39669:26)
at checkCallExpression (D:\dev\myapp\node_modules\typescript\lib\typescript.js:39696:29)
@ ./src/providers/file-logger.ts 58:0-28
@ ./src/app/app.module.ngfactory.ts
@ ./src/app/main.ts,./~/d3/d3.js
Module build failed: RangeError: Maximum call stack size exceeded
at RegExp.[Symbol.replace] (native)
at String.replace (native)
at formatStringFromArgs (D:\dev\myapp\node_modules\typescript\lib\typescript.js:2365:21)
at Object.chainDiagnosticMessages (D:\dev\myapp\node_modules\typescript\lib\typescript.js:2433:20)
at reportNonexistentProperty (D:\dev\myapp\node_modules\typescript\lib\typescript.js:38290:28)
at checkPropertyAccessExpressionOrQualifiedName (D:\dev\myapp\node_modules\typescript\lib\typescript.js:38332:
21)
at checkPropertyAccessExpression (D:\dev\myapp\node_modules\typescript\lib\typescript.js:38274:20)
at checkExpressionWorker (D:\dev\myapp\node_modules\typescript\lib\typescript.js:41158:28)
at checkExpression (D:\dev\myapp\node_modules\typescript\lib\typescript.js:41115:42)
at checkExpressionWithContextualType (D:\dev\myapp\node_modules\typescript\lib\typescript.js:40983:26)
@ ./src/pages/mypage/mypage.ts 61:0-25
@ ./src/app/app.module.ts
@ ./src/app/app.module.ngfactory.ts
@ ./src/app/main.ts
It seems to not be liking the jszip , and even mkore suprisingly something to do with RegExp
The only place I use RegExp
is as follows
let regExStrip0 = /(\.0+)+$/;
let segmentsA = a.replace(regExStrip0, '').split('.');
let segmentsB = b.replace(regExStrip0, '').split('.');
...
Does anyone know why I now get this error, and know any work around?
Thanks in advance!