DataTables not showing after Deployment [Netlify]

90 views Asked by At

I am on Angular 10, when I work in localhost and I "run" my project, my table which works with "DataTables" works fine.

But when I deployed my solution on Netlify, I no longer see my table, and no error is displayed on my browser console.

Here is my dependencies Package.json:

"dependencies": {
  "@angular/animations": "~10.1.0",
  "@angular/cdk": "^10.2.0",
  "@angular/common": "~10.1.0",
  "@angular/compiler": "~10.1.0",
  "@angular/core": "~10.1.0",
  "@angular/forms": "~10.1.0",
  "@angular/material": "^10.2.0",
  "@angular/platform-browser": "~10.1.0",
  "@angular/platform-browser-dynamic": "~10.1.0",
  "@angular/router": "~10.1.0",
  "angular-datatables": "^9.0.2",
  "bootstrap": "^4.5.2",
  "datatables.net": "^1.10.22",
  "datatables.net-dt": "^1.10.22",
  "datatables.net-searchbuilder-bs4": "^1.0.0",
  "jquery": "^3.5.1",
  "pdfmake": "^0.1.68",
  "popper.js": "^1.16.1",
  "rxjs": "~6.6.0",
  "tslib": "^2.0.0",
  "zone.js": "~0.10.2"
},
"devDependencies": {
  "@angular-devkit/build-angular": "~0.1001.0",
  "@angular/cli": "~10.1.0",
  "@angular/compiler-cli": "~10.1.0",
  "@types/datatables.net": "^1.10.19",
  "@types/jasmine": "~3.5.0",
  "@types/jasminewd2": "~2.0.3",
  "@types/jquery": "^3.5.1",
  "@types/node": "^12.11.1",
  "codelyzer": "^6.0.0",
  "jasmine-core": "~3.6.0",
  "jasmine-spec-reporter": "~5.0.0",
  "karma": "~5.0.0",
  "karma-chrome-launcher": "~3.1.0",
  "karma-coverage-istanbul-reporter": "~3.0.2",
  "karma-jasmine": "~4.0.0",
  "karma-jasmine-html-reporter": "^1.5.0",
  "protractor": "~7.0.0",
  "ts-node": "~8.3.0",
  "tslint": "~6.1.0",
  "typescript": "~4.0.2"
}

I searched the internet, but I think I am the only one who fell into this little problem ^^

Thank you in advance for your help.

1

There are 1 answers

0
TheScripterX On BEST ANSWER

Its good ! I found the solution (it was my fault ^^)

I had put a *ngIf condition on my table, if it was empty, nothing will be displayed :p

In Localhost, it was full, but since I deployed it online (Netlify), it was still empty ^^

I had spent hours looking ... Solution settled.