index.d.ts, found version 4, expected 3.. and Cannot read property 'length' of undefined at LineChartComponen
See original GitHub issuetrying to implementing <ngx-charts-line-chart>
but getting this error:
ERROR in Metadata version mismatch for module C:/Users/Pawel/desktop/code/pami/node_modules/@swimlane/ngx-charts/release /index.d.ts, found version 4, expected 3, resolving symbol AppModule in C:/Users/Pawel/desktop/code/pami/src/app/app.mod ule.ts, resolving symbol AppModule in C:/Users/Pawel/desktop/code/pami/src/app/app.module.ts
as well ass:
TypeError: Cannot read property ‘length’ of undefined at LineChartComponent…/src/line-chart/line-chart.component.ts.LineChartComponent.getXDomain…
package.json:
> `{
> "name": "pami",
> "version": "0.0.0",
> "license": "MIT",
> "scripts": {
> "ng": "ng",
> "start": "ng serve",
> "build": "ng build",
> "test": "ng test",
> "lint": "ng lint",
> "e2e": "ng e2e"
> },
> "private": true,
> "dependencies": {
> "@angular/animations": "^5.0.2",
> "@angular/common": "^4.0.0",
> "@angular/compiler": "^4.0.0",
> "@angular/core": "^4.0.0",
> "@angular/forms": "^4.0.0",
> "@angular/http": "^4.0.0",
> "@angular/platform-browser": "^4.0.0",
> "@angular/platform-browser-dynamic": "^4.0.0",
> "@angular/router": "^4.0.0",
> "@firebase/webchannel-wrapper": "0.2.3",
> "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.5",
> "@swimlane/ngx-charts": "^7.0.0",
> "angularfire2": "^5.0.0-rc.2",
> "bootstrap": "^4.0.0-alpha.6",
> "bootswatch": "^4.0.0-beta.2",
> "core-js": "^2.4.1",
> "d3": "^4.11.0",
> "firebase": "^4.5.0",
> "font-awesome": "^4.7.0",
> "ng-sidebar": "^6.0.2",
> "promise-polyfill": "6.0.2",
> "rxjs": "^5.1.0",
> "zone.js": "^0.8.4"
> },
> "devDependencies": {
> "@angular/cli": "1.0.1",
> "@angular/compiler-cli": "^4.0.0",
> "@types/jasmine": "2.5.38",
> "@types/node": "~6.0.60",
> "codelyzer": "~2.0.0",
> "jasmine-core": "~2.5.2",
> "jasmine-spec-reporter": "~3.2.0",
> "karma": "~1.4.1",
> "karma-chrome-launcher": "~2.0.0",
> "karma-cli": "~1.0.1",
> "karma-jasmine": "~1.1.0",
> "karma-jasmine-html-reporter": "^0.2.2",
> "karma-coverage-istanbul-reporter": "^0.2.0",
> "protractor": "~5.1.0",
> "ts-node": "~2.0.0",
> "tslint": "~4.5.0",
> "typescript": "~2.2.0"
> }
> }
> `
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Highest scored 'ngx-charts' questions - Page 5 - Stack Overflow
[sm]:1 ERROR TypeError: Cannot read property 'map' of undefined. This is the content of stock_inf.ts file(Actually there are bigger and different arrays, ...
Read more >Baljeet Singh on Tumblr
In simple terms, they're a set of data that can be appended to but can't be edited or deleted. Think of it as...
Read more >Why is uncaught TypeError cannot read property of undefined?
How to fix the cannot read property ” values ” error? ... In Firefox Version 19 I get the error “TypeError: o is...
Read more >The ngx-echarts from xieziyu - Coder Social
An angular (ver >= 2.x) directive for ECharts (ver >= 3.x) from Coder Social. ... 1.2.3版本安装的包下有index.ts 和index.js ,typescript 下引入的是index.ts ...
Read more >angular/angular - Gitter
is that to be expected. Rob. @borriej. Apr 10 2018 16:42 UTC. can any one help me out here? im not working with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My error was:
ERROR in Error: Metadata version mismatch for module C:/temp/chartsTest/something/node_modules/@swimlane/ngx-charts/release/index.d.ts, found version 4, expected 3, resolving symbol AppModule in C:/temp/chartsTest/something/src/app/app.module.ts, resolving symbol AppModule in C:/temp/chartsTest/something/src/app/app.module.ts
@neo-xy I’m using Angular 4.0.2, and I needed to use ngx-charts in it’s 6.0.2 version to avoid this mismatch error. 6.1.0 seems to be for Angular 4.3 and higher and 7.0.0 seems to be for Angular 5.0
The undefined errormight be code related issue on your side sending the wrong data to the chart. For this chart, the library expect a multi data sample and not a simple one as you can see here : https://swimlane.gitbooks.io/ngx-charts/content/charts/line-chart.html