ngx-echarts
ngx-echarts copied to clipboard
Failed to complie echarts for me
Error i am getting is ERROR in node_modules/echarts/types/dist/echarts.d.ts(264,51): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(264,52): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(264,55): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(264,68): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(264,70): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(264,71): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(264,78): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(264,81): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(264,82): error TS1128: Declaration or statement expected. node_modules/echarts/types/dist/echarts.d.ts(268,68): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,71): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,92): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(268,106): error TS1005: ')' expected. node_modules/echarts/types/dist/echarts.d.ts(268,113): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(268,120): error TS1005: ')' expected. node_modules/echarts/types/dist/echarts.d.ts(268,136): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(268,140): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(268,155): error TS1005: ')' expected. node_modules/echarts/types/dist/echarts.d.ts(268,156): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(268,178): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,181): error TS1011: An element access expression should take an argument. node_modules/echarts/types/dist/echarts.d.ts(268,206): error TS1005: '(' expected. node_modules/echarts/types/dist/echarts.d.ts(268,210): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,214): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,238): error TS1005: '(' expected. node_modules/echarts/types/dist/echarts.d.ts(268,242): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,275): error TS1005: '(' expected. node_modules/echarts/types/dist/echarts.d.ts(268,279): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,289): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,306): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(268,310): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,322): error TS1011: An element access expression should take an argument. node_modules/echarts/types/dist/echarts.d.ts(268,335): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,339): error TS1011: An element access expression should take an argument. node_modules/echarts/types/dist/echarts.d.ts(268,360): error TS1005: '(' expected. node_modules/echarts/types/dist/echarts.d.ts(268,369): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,377): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,393): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(268,398): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,405): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(268,415): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(268,425): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(268,431): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(269,51): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(269,52): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(269,115): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(269,116): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(270,54): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(270,55): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(270,152): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(270,153): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(271,51): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(271,52): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(271,115): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(271,116): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(272,49): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(272,50): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(272,115): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(272,116): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(704,55): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(704,61): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(705,74): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(705,80): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(1201,49): error TS1005: ']' expected. node_modules/echarts/types/dist/echarts.d.ts(1201,51): error TS1134: Variable declaration expected. node_modules/echarts/types/dist/echarts.d.ts(1201,118): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(1264,114): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(1264,120): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(3094,51): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(3094,58): error TS1005: ')' expected. node_modules/echarts/types/dist/echarts.d.ts(3094,73): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(3094,87): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(3094,105): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(3094,122): error TS1011: An element access expression should take an argument. node_modules/echarts/types/dist/echarts.d.ts(3094,123): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(3094,124): error TS1128: Declaration or statement expected. node_modules/echarts/types/dist/echarts.d.ts(3095,1): error TS1128: Declaration or statement expected. node_modules/echarts/types/dist/echarts.d.ts(3100,51): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(3100,58): error TS1005: ')' expected. node_modules/echarts/types/dist/echarts.d.ts(3100,73): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(3100,76): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(3100,77): error TS1128: Declaration or statement expected. node_modules/echarts/types/dist/echarts.d.ts(3101,1): error TS1128: Declaration or statement expected. node_modules/echarts/types/dist/echarts.d.ts(3676,55): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(3676,61): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(3676,63): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(3676,127): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(3676,133): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(3676,157): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(3676,163): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(4531,51): error TS1005: ']' expected. node_modules/echarts/types/dist/echarts.d.ts(4531,65): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(4531,83): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(4531,90): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(4532,46): error TS1005: ']' expected. node_modules/echarts/types/dist/echarts.d.ts(4532,61): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(4533,47): error TS1005: ']' expected. node_modules/echarts/types/dist/echarts.d.ts(4533,65): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(4630,36): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(4630,49): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(6601,51): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(6601,58): error TS1005: ')' expected. node_modules/echarts/types/dist/echarts.d.ts(6601,73): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6601,87): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(6601,105): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(6601,122): error TS1011: An element access expression should take an argument. node_modules/echarts/types/dist/echarts.d.ts(6601,123): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6601,124): error TS1128: Declaration or statement expected. node_modules/echarts/types/dist/echarts.d.ts(6602,1): error TS1128: Declaration or statement expected. node_modules/echarts/types/dist/echarts.d.ts(6633,71): error TS1005: ']' expected. node_modules/echarts/types/dist/echarts.d.ts(6633,74): error TS1005: ')' expected. node_modules/echarts/types/dist/echarts.d.ts(6633,75): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. node_modules/echarts/types/dist/echarts.d.ts(6633,99): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6633,100): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. node_modules/echarts/types/dist/echarts.d.ts(6633,105): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6633,108): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6634,98): error TS1005: ']' expected. node_modules/echarts/types/dist/echarts.d.ts(6634,104): error TS1005: ')' expected. node_modules/echarts/types/dist/echarts.d.ts(6634,105): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. node_modules/echarts/types/dist/echarts.d.ts(6634,129): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6634,130): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. node_modules/echarts/types/dist/echarts.d.ts(6634,135): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6634,138): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6634,141): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6638,76): error TS1005: ']' expected. node_modules/echarts/types/dist/echarts.d.ts(6638,79): error TS1005: ')' expected. node_modules/echarts/types/dist/echarts.d.ts(6638,80): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. node_modules/echarts/types/dist/echarts.d.ts(6638,101): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6638,102): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. node_modules/echarts/types/dist/echarts.d.ts(6638,113): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(6638,116): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6638,119): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6638,120): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(6639,34): error TS1005: '?' expected. node_modules/echarts/types/dist/echarts.d.ts(6639,56): error TS1005: '?' expected. node_modules/echarts/types/dist/echarts.d.ts(6639,81): error TS1005: '?' expected. node_modules/echarts/types/dist/echarts.d.ts(6639,87): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(6639,135): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(6639,143): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6639,160): error TS1005: '(' expected. node_modules/echarts/types/dist/echarts.d.ts(6639,179): error TS1005: '(' expected. node_modules/echarts/types/dist/echarts.d.ts(6640,33): error TS1005: '?' expected. node_modules/echarts/types/dist/echarts.d.ts(6640,57): error TS1005: '?' expected. node_modules/echarts/types/dist/echarts.d.ts(6640,84): error TS1005: '?' expected. node_modules/echarts/types/dist/echarts.d.ts(6640,90): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(6640,124): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(6640,132): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6640,153): error TS1005: '(' expected. node_modules/echarts/types/dist/echarts.d.ts(6653,14): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6654,18): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6654,24): error TS1109: Expression expected. node_modules/echarts/types/dist/echarts.d.ts(6655,12): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6655,24): error TS1005: '(' expected. node_modules/echarts/types/dist/echarts.d.ts(6656,19): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(6656,39): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(6656,46): error TS1011: An element access expression should take an argument. node_modules/echarts/types/dist/echarts.d.ts(6656,48): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6656,50): error TS1128: Declaration or statement expected. node_modules/echarts/types/dist/echarts.d.ts(6656,66): error TS1011: An element access expression should take an argument. node_modules/echarts/types/dist/echarts.d.ts(6657,27): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(6657,38): error TS1005: ',' expected. node_modules/echarts/types/dist/echarts.d.ts(6657,45): error TS1011: An element access expression should take an argument. node_modules/echarts/types/dist/echarts.d.ts(6657,47): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6657,56): error TS1011: An element access expression should take an argument. node_modules/echarts/types/dist/echarts.d.ts(6658,25): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(6659,5): error TS1128: Declaration or statement expected. node_modules/echarts/types/dist/echarts.d.ts(6660,1): error TS1128: Declaration or statement expected. node_modules/echarts/types/dist/echarts.d.ts(9755,43): error TS1005: ']' expected. node_modules/echarts/types/dist/echarts.d.ts(9755,45): error TS1134: Variable declaration expected. node_modules/echarts/types/dist/echarts.d.ts(9755,89): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(9782,45): error TS1005: ']' expected. node_modules/echarts/types/dist/echarts.d.ts(9782,47): error TS1134: Variable declaration expected. node_modules/echarts/types/dist/echarts.d.ts(9782,53): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(9800,45): error TS1005: ']' expected. node_modules/echarts/types/dist/echarts.d.ts(9800,47): error TS1134: Variable declaration expected. node_modules/echarts/types/dist/echarts.d.ts(9800,61): error TS1005: ';' expected. node_modules/echarts/types/dist/echarts.d.ts(9801,44): error TS1005: ']' expected. node_modules/echarts/types/dist/echarts.d.ts(9801,46): error TS1134: Variable declaration expected. node_modules/echarts/types/dist/echarts.d.ts(9801,69): error TS1005: ';' expected. node_modules/ngx-echarts/lib/ngx-echarts.directive.d.ts(2,13): error TS1005: '=' expected. node_modules/ngx-echarts/lib/ngx-echarts.directive.d.ts(2,36): error TS1005: ';' expected.
ℹ 「wdm」: Failed to compile.
my package.json is here { "name": "comprehensive-platform-webui", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve --host=0.0.0.0 --proxy-config proxy.conf.json", "build": "ng build --prod", "prod": "ng build --prod", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^6.1.10", "@angular/cdk": "^6.4.7", "@angular/common": "^6.1.0", "@angular/compiler": "^6.1.0", "@angular/core": "^6.1.0", "@angular/forms": "^6.1.0", "@angular/http": "^6.1.0", "@angular/material": "^6.4.7", "@angular/platform-browser": "^6.1.0", "@angular/platform-browser-dynamic": "^6.1.0", "@angular/router": "^6.1.0", "@azure/msal-angular": "^1.1.2", "core-js": "^2.5.4", "echarts": "^5.1.2", "hammerjs": "^2.0.8", "msal": "^1.4.12", "ngx-echarts": "^7.0.1", "rxjs": "^6.0.0", "rxjs-compat": "6.6.7", "zone.js": "~0.8.26" }, "devDependencies": { "@angular-devkit/build-angular": "~0.8.0", "@angular/cli": "~6.2.9", "@angular/compiler-cli": "^6.1.0", "@angular/language-service": "^6.1.0", "@juggle/resize-observer": "^3.3.1", "@types/echarts": "^4.9.9", "@types/jasmine": "~2.8.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", "codelyzer": "~4.3.0", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~3.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~1.1.2", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.11.0", "typescript": "^2.9.2" } }
Please upgrade angular to >= 11.0
Having the same problem above, is there anyway to make ngx-echarts work in angular 6? Updating angular is not an option right now.
I have installed echarts as suggested:
npm install echarts -S
npm install ngx-echarts -S
Then included the ngx-echarts module in component module file:
import { NgxEchartsModule } from 'ngx-echarts';
@NgModule({ imports: [ ... NgxEchartsModule ],
And getting following compiling error:
ERROR in node_modules/ngx-echarts/lib/ngx-echarts.directive.d.ts(2,13): error TS1005: '=' expected. node_modules/ngx-echarts/lib/ngx-echarts.directive.d.ts(2,36): error TS1005: ';' expected.
Any idea? Thank you.
Here you are getting this error , because the version you are using for echarts isn't compatible with version of angular
Ex: Angular 7 isn't compatible with charts V5.0.0 or greater.
Trick to active this:
![image](https://user-images.githubusercontent.com/58413215/189815137-e08252db-e76a-4b2f-9147-bee7df491919.png)
![image](https://user-images.githubusercontent.com/58413215/189815147-d658d153-6889-408f-9a41-59eb3937127f.png)
![image](https://user-images.githubusercontent.com/58413215/189815169-23e0b788-e9ab-42e6-af81-144dafc7179a.png)