Issue
I need to upgrade my primeng package from 7 to 8.
I am getting the following error:
anager-console/src/main/frontend/node_modules/primeng/primeng"' has no exported member 'DataTable'
the following import is not found in the component file
import { DataTable } from 'primeng/primeng';
package.json
"private": true,
"dependencies": {
"@angular/animations": "7.2.15",
"@angular/cdk": "7.3.7",
"@angular/common": "7.2.15",
"@angular/compiler": "7.2.15",
"@angular/core": "7.2.15",
"@angular/forms": "7.2.15",
"@angular/http": "7.2.15",
"@angular/platform-browser": "7.2.15",
"@angular/platform-browser-dynamic": "7.2.15",
"@angular/router": "7.2.15",
"@fortawesome/fontawesome-free": "^5.7.2",
"bootstrap": "^3.4.1",
"classlist.js": "^1.1.20150312",
"core-js": "^2.6.5",
"floatthead": "^2.1.3",
"jquery": "^3.4.1",
"jquery-ui-dist": "^1.12.1",
"ng-treetable": "^1.3.3",
"ngx-bootstrap": "^3.2.0",
"primeicons": "^1.0.0",
"primeng": "^8.0.1",
"rxjs": "^6.4.0",
"rxjs-compat": "^6.4.0",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.29"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.9",
"@angular/cli": "7.3.9",
"@angular/compiler-cli": "7.2.15",
"@angular/language-service": "7.2.15",
"@types/jasmine": "^2.8.16",
"@types/jasminewd2": "^2.0.6",
"@types/node": "^10.14.1",
"codelyzer": "^5.0.1",
"eslint": "^5.16.0",
"jasmine-core": "~3.3.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.3",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "^5.4.1",
"ts-node": "~7.0.1",
"tslint": "~5.16.0",
"typescript": "3.1.6"
}
Update
I did update the Angular to 8 and still have the same issue.
After further investigation, the DataTable component was removed in primeNG 8. I looked at release notes, and there is nothing mention about the removing DataTable component. Now I need to find out what do I use instead..
Solution
replaced all import { DataTable } from 'primeng/primeng';
with import { Table } from 'primeng/table';
solved my issue
Answered By - Happy Coder
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.