3

I am trying to use TableModule and getting these errors, i tam trying to folow the installation notes from the module page

  1. import {TableModule} from 'primeng/table'; enter image description here

  2. have some data for the table enter image description here

  3. using the table ` enter image description here

but i get errors: enter image description here

I tried to run this command npm install rxjs- but it didn't help..

what am i doing wrong?


package.json

{
  "name": "prime",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^6.0.0",
    "@angular/common": "^6.0.0",
    "@angular/compiler": "^6.0.0",
    "@angular/core": "^6.0.0",
    "@angular/forms": "^6.0.0",
    "@angular/http": "^6.0.0",
    "@angular/platform-browser": "^6.0.0",
    "@angular/platform-browser-dynamic": "^6.0.0",
    "@angular/router": "^6.0.0",
    "core-js": "^2.5.4",
    "rxjs": "^6.0.0",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular/compiler-cli": "^6.0.0",
    "@angular-devkit/build-angular": "~0.6.1",
    "typescript": "~2.7.2",
    "@angular/cli": "~6.0.1",
    "@angular/language-service": "^6.0.0",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.2.1",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~1.7.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~1.4.2",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.3.0",
    "ts-node": "~5.0.1",
    "tslint": "~5.9.1"
  }
}
E.Meir
  • 2,146
  • 7
  • 34
  • 52

2 Answers2

0

It sounds like the right package is installed, so I would recommend going through npm's troubleshooting steps, the following in particular:

"Some strange issues can be resolved by simply running npm cache clean and trying again."

If the problem persists and assuming your dependencies are in a package.json, I would recommend trying a more complete refresh by deleting the node_modules directory and re-running npm install.

If that doesn't work, please post your package.json dependencies so we have a clearer picture to work from.

Jon
  • 96
  • 6
  • 1) I tried to use `npm cache clean --force` 2) tried to delete `node_modules` folder and after that to use`npm install`3) tried to downgrade with this command `npm install -g npm@5.6.0`. none of these worked- so i published `package.json` in the main post – E.Meir May 21 '18 at 07:20
0

There is some packages need to be update in node_modules 1)nx migrate @angular/cdk@^14 @angular/cli@^14 @angular-devkit/build-angular@^14 Instead of nx migrate if u work angular single app Ng update 2)npm i --legacy-peer-deps