wnabil / ngx-export-as

Angular 2+ / Ionic 2+ HTML/table element to export it as JSON, XML, PNG, CSV, TXT, MS-Word, Ms-Excel, PDF
MIT License
68 stars 40 forks source link

Namespace '"@angular/core/core"' has no exported member #105

Closed dekathomas closed 2 years ago

dekathomas commented 2 years ago

Hello I face a problem when I try to run my Angular project. My Angular Core version is 8.2.14 and I got this error

image

My dependencies in my package.json are:

"dependencies": {
    "@angular/animations": "^8.2.14",
    "@angular/cdk": "^8.2.3",
    "@angular/cli": "^8.3.25",
    "@angular/common": "^8.2.14",
    "@angular/compiler": "^8.2.14",
    "@angular/core": "^8.2.14",
    "@angular/forms": "^8.2.14",
    "@angular/http": "^7.2.16",
    "@angular/material": "^8.2.2",
    "@angular/platform-browser": "^8.2.14",
    "@angular/platform-browser-dynamic": "^8.2.14",
    "@angular/router": "^8.2.14",
    "@angular/service-worker": "^8.2.14",
    "@ng-bootstrap/ng-bootstrap": "^5.3.1",
    "@ng-select/ng-select": "3.7.3",
    "@nicky-lenaers/ngx-scroll-to": "^3.0.1",
    "animated-scroll-to": "^1.2.2",
    "bootstrap": "^4.4.1",
    "browser-image-compression": "^1.0.17",
    "core-js": "^3.6.1",
    "crypto-js": "^3.1.9-1",
    "font-awesome": "^4.7.0",
    "grunt-contrib-cssmin": "^3.0.0",
    "hammerjs": "^2.0.8",
    "i": "^0.3.6",
    "jspdf": "^1.5.3",
    "jspdf-autotable": "^3.1.1",
    "load-grunt-tasks": "^5.1.0",
    "lodash": "^4.17.15",
    "lzjs": "^1.3.0",
    "markdown-it": "^10.0.0",
    "moment": "^2.24.0",
    "ng-inline-svg": "^10.0.0",
    "ng-select": "^1.0.2",
    "ng2-pdf-viewer": "^6.3.2",
    "ngx-clipboard": "^12.3.1",
    "ngx-cookie-service": "^2.4.0",
    "ngx-export-as": "^1.3.1",
    "ngx-filter-pipe": "^2.1.2",
    "ngx-infinite-scroll": "^8.0.1",
    "ngx-mask": "8.0.1",
    "ngx-order-pipe": "^2.0.4",
    "ngx-pagination": "^5.0.0",
    "ngx-permissions": "^6.0.6",
    "ngx-pinch-zoom": "2.4.4",
    "ngx-swiper-wrapper": "^8.0.2",
    "npm": "^6.14.2",
    "rxjs": "^6.5.4",
    "rxjs-compat": "^6.5.4",
    "shortid-dist": "^1.0.4",
    "sweetalert2": "^7.18.0",
    "swiper": "^4.4.5",
    "tslib": "^1.10.0",
    "typescript-base64-arraybuffer": "^0.1.0",
    "zone.js": "^0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.803.25",
    "@angular/compiler-cli": "^8.2.14",
    "@angular/language-service": "^8.2.14",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/jspdf": "^1.1.31",
    "@types/node": "^8.10.52",
    "angular-ui-swiper": "^2.3.8",
    "codelyzer": "^5.0.1",
    "grunt": "^1.1.0",
    "grunt-war": "^0.5.1",
    "jasmine-core": "~3.1.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "^1.4.2",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^1.0.0",
    "protractor": "^5.4.1",
    "ts-node": "~5.0.1",
    "tslint": "~5.9.1",
    "typescript": "3.5.3"
  }

And one thing I realize is when I try to open package-lock.json is the peerDependencies of ngx-export-as module is

"node_modules/ngx-export-as": {
      "version": "1.13.0",
      "resolved": "https://registry.npmjs.org/ngx-export-as/-/ngx-export-as-1.13.0.tgz",
      "integrity": "sha512-02Mz0Ykb6GymGIfdHxL8oAhsai5tFxqiD3G37i+acz65oTpcskOr9B4r0MdByoyYYGag6StwHV7y40yLJZS0Pg==",
      "dependencies": {
        "html-to-docx": "^1.2.4",
        "html2pdf.js": "^0.10.1",
        "rxjs": "~7.4.0",
        "tslib": "^2.3.1",
        "xlsx": "^0.17.4"
      },
      "peerDependencies": {
        "@angular/common": "^13.0.2",
        "@angular/core": "^13.0.2"
      }
    },

I don't have any ideas is this wrong or not. Thank you in advance.

wnabil commented 2 years ago

latest version is not compatible with angular 8 try older versions or upgrade your project to angualr 13 https://github.com/wnabil/ngx-export-as#change-logs

dekathomas commented 2 years ago

In my package.json I already install 1.3.1 but in my package-lock.json is declared as version 1.13.0. But I have addressed the problem by removing the ^ sign and reinstall the library.

Thanks