Ionic (3.6.1) の types/plotly.js で plotly.js (@1.35.2) を使用しています。
ionic serve
すべて(プロットを含む)を使用すると、ブラウザで正常に動作します。使用時ionic cordova run android --device
も問題なく動いています。アプリはデバイスにインストールされ、使用可能です。ただ、アプリ起動時の待ち時間が長い。
で本番用のアプリをビルドしようとionic cordova run android --device
すると、エラーが発生し、ビルドがまったく機能しません。プロダクションビルドで使用される縮小プロセスと関係があると思います。エラーを正しく理解しているかどうかもわかりません。
これは私が得るエラーです:
Error: ./node_modules/d3/d3.js
Module build failed: RangeError: Maximum call stack size exceeded
at checkPropertyAccessExpressionOrQualifiedName (/home/aiko/IdeaProjects/etmos_the/node_modules/typescript/lib/typescript.js:38454:62)
at checkPropertyAccessExpression (/home/aiko/IdeaProjects/etmos_the/node_modules/typescript/lib/typescript.js:38413:20)
at checkExpressionWorker (/home/aiko/IdeaProjects/etmos_the/node_modules/typescript/lib/typescript.js:41300:28)
at checkExpression (/home/aiko/IdeaProjects/etmos_the/node_modules/typescript/lib/typescript.js:41257:42)
at checkBinaryLikeExpression (/home/aiko/IdeaProjects/etmos_the/node_modules/typescript/lib/typescript.js:40834:28)
at checkBinaryExpression (/home/aiko/IdeaProjects/etmos_the/node_modules/typescript/lib/typescript.js:40827:20)
at checkExpressionWorker (/home/aiko/IdeaProjects/etmos_the/node_modules/typescript/lib/typescript.js:41335:28)
at checkExpression (/home/aiko/IdeaProjects/etmos_the/node_modules/typescript/lib/typescript.js:41257:42)
at checkBinaryLikeExpression (/home/aiko/IdeaProjects/etmos_the/node_modules/typescript/lib/typescript.js:40834:28)
at checkBinaryExpression (/home/aiko/IdeaProjects/etmos_the/node_modules/typescript/lib/typescript.js:40827:20)
@ ./node_modules/plotly.js/src/plots/plots.js 9:9-22
@ ./node_modules/plotly.js/src/transforms/groupby.js
@ ./node_modules/plotly.js/lib/groupby.js
@ ./node_modules/plotly.js/lib/index.js
@ ./src/pages/statSites/statQuestionnaire/statQuestionnaire.ts
@ ./src/app/app.module.ts
@ ./src/app/app.module.ngfactory.ts
@ ./src/app/main.ts,./node_modules/plotly.js/src/plots/cartesian/axes.js
Module parse failed: Error parsing regular expression: Invalid regular expression: / newDiff + 1e-6) % 1 < 2e-6 &&(((newFirst - ax._forceTick0) /: Unmatched ')' (185:53)
You may need an appropriate loader to handle this file type.
| // and forceTick0 can be shifted to newFirst
| if (function (ax, _minDtick) {
| if (_minDtick === void 0) { _minDtick = / newDiff + 1e-6) % 1 < 2e-6 &&(((newFirst - ax._forceTick0) / newDiff % 1) +
| 1.000001) % 1 < 2e-6; }
| ax._minDtick = newDiff;
@ ./node_modules/plotly.js/src/transforms/filter.js 11:11-45
@ ./node_modules/plotly.js/lib/filter.js
@ ./node_modules/plotly.js/lib/index.js
@ ./src/pages/statSites/statQuestionnaire/statQuestionnaire.ts
@ ./src/app/app.module.ts
@ ./src/app/app.module.ngfactory.ts
@ ./src/app/main.ts
at BuildError.Error (native)
at new BuildError (/home/aiko/IdeaProjects/etmos_the/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at callback (/home/aiko/IdeaProjects/etmos_the/node_modules/@ionic/app-scripts/dist/webpack.js:119:28)
at emitRecords.err (/home/aiko/IdeaProjects/etmos_the/node_modules/webpack/lib/Compiler.js:265:13)
at Compiler.emitRecords (/home/aiko/IdeaProjects/etmos_the/node_modules/webpack/lib/Compiler.js:371:38)
at emitAssets.err (/home/aiko/IdeaProjects/etmos_the/node_modules/webpack/lib/Compiler.js:258:10)
at applyPluginsAsyncSeries1.err (/home/aiko/IdeaProjects/etmos_the/node_modules/webpack/lib/Compiler.js:364:12)
at next (/home/aiko/IdeaProjects/etmos_the/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/home/aiko/IdeaProjects/etmos_the/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/home/aiko/IdeaProjects/etmos_the/node_modules/tapable/lib/Tapable.js:222:13)