Closed PedroS5499 closed 4 years ago
same here :(
Same any news ?
What version of ng2-pdf-viewer
are you using?
Last, but it's work on version 6.1.2
What version of
ng2-pdf-viewer
are you using? I have the same issue on 6.3.2 version
Downgrading to version 4.1.2 helps
https://stackblitz.com/edit/ng2-pdf-viewer-u1sbr7?file=package.json
{ "name": "angular", "version": "0.0.0", "private": true, "dependencies": { "@angular/animations": "10.0.2", "@angular/common": "10.0.2", "@angular/compiler": "10.0.2", "@angular/core": "10.0.2", "@angular/forms": "10.0.2", "@angular/platform-browser": "10.0.2", "@angular/platform-browser-dynamic": "10.0.2", "@angular/router": "10.0.2", "@types/pdfjs-dist": "2.0.1", "core-js": "2.6.9", "ng2-pdf-viewer": "^6.3.2", "rxjs": "6.5.2", "url": "^0.11.0", "webpack": "4.39.0", "zone.js": "0.9.1" }, "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "devDependencies": { "@angular-devkit/build-angular": "~0.10.0", "@angular/cli": "~7.0.2", "@angular/compiler-cli": "~7.0.0", "@angular/language-service": "~7.0.0", "@types/node": "~8.9.4", "@types/jasmine": "~2.8.8", "@types/jasminewd2": "~2.0.3", "codelyzer": "~4.5.0", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~3.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~1.1.2", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.11.0", "typescript": "~3.1.1" } }
hy, i have some news. Im using last version of ng2-pdf-viewer 6.3.2
I forced downgrade version of angular, so rollback all angular packages and dependencies and still gave same error. Compared package.json to see what is different and found that, @angular-devkit/build-angular is what cause the issue there. If you force downgrade version of that angular package (build_angular) to 0.901.6 compile and works just fine. So i figured out that the issue is how build of angular compile all external vendor packages. Or you need to change something in ng2-pdf to make compatible with new version of @angular-devkit/build-angular.
I hope that helps @VadimDez
{ "name": "comau", "version": "1.1.0", "description": "comau", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start" }, "repository": { "type": "git", "url": "" }, "keywords": [ "angular dashboard", "angular admin", "angular bootstrap admin", "angular bootstrap dashboard", "angular panel", "angular bootstrap template", "angular admin template", "angular free", "angular free dashboard", "angular free bootstrap dashboard", "free admin template", "angular admin", "angular admin panel", "angular dashboard", "angular dashboard free", "angular admin free", "angular free admin panel", "angular freebie", "angular freebie dashboard", "angular freebie bootstrap dashboard", "freebie admin template", "angular dashboard freebie", "angular admin freebie", "angular freebie admin panel", "creative tim", "web dashboard", "bootstrap 4 dashboard", "bootstrap 4", "css3 dashboard", "bootstrap 4 admin", "black dashboard bootstrap 4", "frontend", "responsive bootstrap 4 dashboard", "free dashboard", " free admin dashboard", "free bootstrap 4 admin dashboard" ], "author": "", "license": "", "bugs": { "url": "" }, "homepage": "", "private": false, "dependencies": { "@angular/animations": "~10.0.3", "@angular/cdk": "10.0.1", "@angular/common": "~10.0.3", "@angular/compiler": "~10.0.3", "@angular/core": "~10.0.3", "@angular/forms": "~10.0.3", "@angular/localize": "^10.0.3", "@angular/material": "10.0.1", "@angular/platform-browser": "~10.0.3", "@angular/platform-browser-dynamic": "~10.0.3", "@angular/platform-server": "^10.0.3", "@angular/router": "~10.0.3", "@ng-bootstrap/ng-bootstrap": "7.0.0", "@sweetalert2/ngx-sweetalert2": "^8.1.1", "angular-material-icons": "^0.7.1", "bootstrap": "4.5.0", "bootstrap-material-design": "4.1.3", "bootstrap-notify": "3.1.3", "chart.js": "2.9.3", "classlist.js": "^1.1.20150312", "ngx-extended-pdf-viewer": "^4.0.2", "ngx-markdown": "^10.0.0", "ngx-perfect-scrollbar": "^9.0.0", "ngx-toastr": "10.0.4", "perfect-scrollbar": "^1.5.0", "prismjs": "^1.20.0", "rxjs": "~6.6.0", "rxjs-compat": "6.6.0", "sweetalert2": "^9.15.3", "tslib": "^2.0.0", "web-animations-js": "^2.3.2", "zone.js": "~0.10.3" }, "devDependencies": { "@angular-devkit/build-angular": "0.901.6", "@angular-devkit/schematics": "^9.1.11", "@angular/cli": "10.0.2", "@angular/compiler-cli": "10.0.3", "@angular/language-service": "^10.0.3", "@types/jasmine": "3.5.11", "@types/jasminewd2": "2.0.8", "@types/node": "14.0.23", "codelyzer": "6.0.0", "jasmine-core": "3.5.0", "jasmine-spec-reporter": "5.0.2", "karma": "5.1.0", "karma-chrome-launcher": "3.1.0", "karma-coverage-istanbul-reporter": "3.0.3", "karma-jasmine": "3.3.1", "karma-jasmine-html-reporter": "1.5.4", "protractor": "7.0.0", "ts-node": "8.10.2", "tslint": "6.1.2", "typescript": "3.9.6" } }
Updating "@angular-devkit/build-angular": "^0.1000.4" to the latest version is solving the issue
Updating @angular-devkit/build-angular to @latest = 0.1000.5 or @next = 0.1001.0-next.3 solving the issue.
Bug Report or Feature Request (mark with an
x
)When updating from Angular 9 to 10, build or serve, on modules loading in browser breaks in error on ng2-pdf-viewer component
Error (browser console):
Module:
Component: