Я использую ng2-pdf-viewer в angular 6 проекте,
При компиляции проекта выдает следующие ошибки ERROR в node_modules/@types/pdfjs-dist/index.d.ts (63,39): ошибка TS2304: не удается найти имя «неизвестно». node_modules/@types/pdfjs-dist/index.d.ts (65,34): ошибка TS2304: не удается найти имя «неизвестно». node_modules/@types/pdfjs-dist/index.d.ts (80,31): ошибка TS2304: не удается найти имя «неизвестно». node_modules/@types/pdfjs-dist/index.d.ts (82,30): ошибка TS2304: не удается найти имя «неизвестно».
мой пакет. json файл приведен ниже.
"dependencies": {
"@angular/animations": "^6.1.10",
"@angular/common": "^6.1.0",
"@angular/compiler": "^6.1.0",
"@angular/core": "^6.1.0",
"@angular/forms": "^6.1.0",
"@angular/http": "^6.1.0",
"@angular/platform-browser": "^6.1.0",
"@angular/platform-browser-dynamic": "^6.1.0",
"@angular/router": "^6.1.0",
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"@vimeo/player": "^2.10.0",
"@types/node": "10.3.1",
"angular-6-datatable": "~0.8.0",
"angular-6-social-login": "~1.1.1",
"bootstrap": "^4.3.1",
"core-js": "^2.5.4",
"crypto-js": "~3.1.9-1",
"devextreme": "^19.1.5",
"devextreme-angular": "^19.1.5",
"font-awesome": "~4.7.0",
"jquery": "^3.4.1",
"ng2-drag-drop": "^3.0.2",
"ng2-pdf-viewer": "^6.0.2",
"ng5-slider": "^1.2.4",
"ngx-bootstrap": "^3.3.0",
"ngx-drag-scroll": "~7.4.2",
"ngx-image-cropper": "~1.3.10",
"ngx-loading": "^3.0.1",
"ngx-owl-carousel-o": "~1.1.5",
"ngx-rating": "0.0.9",
"ngx-slick-carousel": "^0.4.4",
"ngx-toastr": "~10.0.4",
"ngx-ui-loader": "^7.2.2",
"popper.js": "~1.15.0",
"rxjs": "~6.2.0",
"rxjs-compat": "^6.5.2",
"slick-carousel": "^1.8.1",
"stream": "0.0.2",
"swiper": "^4.5.0",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.8.0",
"@angular/cli": "~6.2.9",
"@angular/compiler-cli": "^6.1.0",
"@angular/language-service": "^6.1.0",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "~4.3.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": "~2.9.2"
}
Это мой пакет. json file