xieziyu / ngx-echarts

An angular (ver >= 2.x) directive for ECharts (ver >= 3.x)
https://xieziyu.github.io/ngx-echarts/
MIT License
1.11k stars 197 forks source link

build error #184

Closed boloboloda closed 4 years ago

boloboloda commented 5 years ago

os: Mojave 10.14.4 My project is based on angular-starter. package.json file

"dependencies":** { "@angular/animations": "^6.0.6", "@angular/common": "^6.0.6", "@angular/compiler": "^6.0.6", "@angular/core": "^6.0.6", "@angular/forms": "^6.0.6", "@angular/platform-browser": "^6.0.6", "@angular/platform-browser-dynamic": "^6.0.6", "@angular/platform-server": "^6.0.6", "@angular/router": "^6.0.6", "rxjs": "^6.2.1", "rxjs-compat": "6.2.2", }, "devDependencies": { "webpack": "^4.12.0", "webpack-cli": "^3.0.8", "webpack-dev-middleware": "^3.1.3", "webpack-dev-server": "^3.1.4", "webpack-filter-warnings-plugin": "^1.2.1", "webpack-inline-manifest-plugin": "^4.0.1", "webpack-merge": "^4.1.3" },

run this command npm run rimraf -- dist && npm run rimraf -- compiled && cross-env BUILD_AOT=1 npm run webpack -- --config config/webpack.prod.js --progress --profile --bail

I got this error: ERROR in ./node_modules/echarts/lib/component/axis/AxisBuilder.js Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): Error: Debug Failure. False expression. at getJSDocTags (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:13197:22) at getFirstJSDocTag (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:13205:24) at Object.getJSDocType (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:13173:19) at getContextualSignature (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:41002:32) at checkFunctionExpressionOrObjectLiteralMethod (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:44621:43) at checkExpressionWorker (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45681:28) at checkExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45609:42) at checkExpressionCached (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45457:38) at getWidenedTypeFromJSSpecialPropertyDeclarations (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:30757:46) at getTypeOfFuncClassEnumModule (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:31163:34) at getTypeOfSymbol (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:31245:24) at checkPropertyAccessExpressionOrQualifiedName (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:42338:53) at checkPropertyAccessExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:42293:20) at checkExpressionWorker (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45663:28) at checkExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45609:42) at checkBinaryLikeExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45154:28) at checkBinaryExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45147:20) at checkExpressionWorker (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45702:28) at checkExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45609:42) at checkExpressionCached (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45457:38) at getTypeOfExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45577:28) at checkDeclarationInitializer (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45469:24) at getTypeForVariableLikeDeclaration (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:30738:28) at getWidenedTypeForVariableLikeDeclaration (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:30961:24) at getTypeOfVariableOrParameterOrProperty (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:31062:28) at getTypeOfSymbol (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:31242:24) at checkVariableLikeDeclaration (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:47828:41) at checkVariableDeclaration (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:47891:20) at checkSourceElement (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:49864:28) at Object.forEach (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:1792:30) at checkVariableStatement (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:47901:16) at checkSourceElement (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:49833:28) at Object.forEach (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:1792:30) at checkSourceFileWorker (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:50023:20) at checkSourceFile (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:49991:13) at Object.forEach (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:1792:30) @ ./node_modules/echarts/lib/component/axisPointer/viewHelper.js 25:18-48 @ ./node_modules/echarts/lib/component/tooltip/TooltipView.js @ ./node_modules/echarts/lib/component/tooltip.js @ ./node_modules/echarts/index.js @ ./node_modules/ngx-echarts/fesm5/ngx-echarts.js @ ./src/app/stock/stock.module.ngfactory.js @ ./$$_lazy_route_resource lazy namespace object @ ./node_modules/@angular/core/fesm5/core.js @ ./src/app/app.module.ngfactory.js @ ./src/main.browser.ts

ERROR in ./node_modules/echarts/lib/chart/helper/Symbol.js Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): Error: Debug Failure. False expression. at getJSDocTags (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:13197:22) at getFirstJSDocTag (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:13205:24) at Object.getJSDocType (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:13173:19) at getContextualSignature (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:41002:32) at checkFunctionExpressionOrObjectLiteralMethod (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:44621:43) at checkExpressionWorker (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45681:28) at checkExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45609:42) at checkExpressionCached (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45457:38) at getWidenedTypeFromJSSpecialPropertyDeclarations (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:30757:46) at getTypeOfFuncClassEnumModule (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:31163:34) at getTypeOfSymbol (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:31245:24) at checkPropertyAccessExpressionOrQualifiedName (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:42338:53) at checkPropertyAccessExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:42293:20) at checkExpressionWorker (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45663:28) at checkExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45609:42) at checkBinaryLikeExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45154:28) at checkBinaryExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45147:20) at checkExpressionWorker (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45702:28) at checkExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45609:42) at checkExpressionCached (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45457:38) at getTypeOfExpression (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45577:28) at checkDeclarationInitializer (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:45469:24) at getTypeForVariableLikeDeclaration (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:30738:28) at getWidenedTypeForVariableLikeDeclaration (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:30961:24) at getTypeOfVariableOrParameterOrProperty (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:31062:28) at getTypeOfSymbol (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:31242:24) at checkVariableLikeDeclaration (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:47828:41) at checkVariableDeclaration (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:47891:20) at checkSourceElement (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:49864:28) at Object.forEach (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:1792:30) at checkVariableStatement (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:47901:16) at checkSourceElement (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:49833:28) at Object.forEach (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:1792:30) at checkSourceFileWorker (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:50023:20) at checkSourceFile (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:49991:13) at Object.forEach (/Users/liwei/project/angular/test/smarterlab-institute/front/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:1792:30) @ ./node_modules/echarts/lib/chart/helper/SymbolDraw.js 20:16-35 @ ./node_modules/echarts/lib/component/marker/MarkPointView.js @ ./node_modules/echarts/lib/component/markPoint.js @ ./node_modules/echarts/index.js @ ./node_modules/ngx-echarts/fesm5/ngx-echarts.js @ ./src/app/stock/stock.module.ngfactory.js @ ./$$_lazy_route_resource lazy namespace object @ ./node_modules/@angular/core/fesm5/core.js @ ./src/app/app.module.ngfactory.js @ ./src/main.browser.ts

Please give me some help, Thanks.

mkr3z commented 5 years ago

I have the same problem, someone knows how I can solve it. Did you get any solution @boloboloda?

boloboloda commented 5 years ago

@markocruz When i tested in the lower version, can be build successfully.

angular version "@angular/animations": "^4.4.2", "@angular/common": "^4.4.2", "@angular/compiler": "^4.4.2", "@angular/core": "^4.4.2", "@angular/forms": "^4.4.2", "@angular/http": "^4.4.2", "@angular/platform-browser": "^4.4.2", "@angular/platform-browser-dynamic": "^4.4.2", "@angular/platform-server": "^4.4.2", "@angular/router": "^4.4.2",

webpack version "webpack": "^3.8.1"

echarts version "echarts": "^4.2.1"

ngx-echarts version "ngx-echarts": "^2.3.1"

"@types/echarts": "^4.1.9"

mkr3z commented 5 years ago

Thank you, you saved my life. I am using version 3.2.0 with angular 6 and work perfectly

boloboloda commented 5 years ago

@markocruz I am glad to help you. I have one more question. Is that “version 3.2.0” of ngx-echarts? What's your version of echarts and @types/echarts ? When i build with angular 6,The program still not work. Please give me a more detailed version list. Thank you.