Я попытался установить пакет firebase в свой проект, и появляются следующие пакеты:
Ошибки после установки rxja и rxjs-compact
После установки RXJS, RXJS-COMPACT также появляются следующие ошибки. ОШИБКА в src/app/firebase-service.service.ts(33,18): ошибка TS2339: свойство 'map' не существует для типа 'Observable>[]>'. src/app/firebase-service.service.ts(47,1) ошибка TS2339: свойство 'map' не существует для типа 'Observable <{}[]>'. Все пакеты, которые я установил, следующие:
{
"name": "angular-io-example",
"version": "1.0.0",
"private": true,
"description": "Example project from an angular.io guide.",
"scripts": {
"ng": "ng",
"start": "ng serve",
"test": "ng test",
"lint": "tslint ./src/**/*.ts -t verbose",
"e2e": "ng e2e",
"build:ssr": "npm run build:client-and-server-bundles && npm run webpack:server",
"serve_dev:ssr": "node dist/server.js",
"serve:ssr": "forever start dist/server.js",
"build:client-and-server-bundles": "ng build --prod && ng run angular.io-example:server",
"webpack:server": "webpack --config webpack.server.config.js --progress --colors"
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@angular/animations": "^6.1.10",
"@angular/cdk": "^6.4.7",
"@angular/cli": "^7.0.3",
"@angular/common": "7.0.1",
"@angular/compiler": "7.0.1",
"@angular/core": "7.0.1",
"@angular/flex-layout": "^5.0.0-beta.14-17a70ee",
"@angular/forms": "^6.0.0",
"@angular/http": "^6.0.0",
"@angular/material": "^6.4.7",
"@angular/platform-browser": "7.0.1",
"@angular/platform-browser-dynamic": "^6.0.0",
"@angular/pwa": "^0.6.8",
"@angular/router": "7.0.1",
"@angular/service-worker": "^6.0.0",
"@angular/upgrade": "^6.0.0",
"@kolkov/angular-editor": "^0.18.4",
"@nguniversal/express-engine": "^6.0.0",
"@nguniversal/module-map-ngfactory-loader": "^6.0.0",
"@types/jquery": "^3.3.31",
"@types/jspdf": "^1.1.31",
"angular-custom-dropdown": "^1.1.1",
"angular-image-slider": "0.0.8",
"angular-in-memory-web-api": "^0.6.0",
"angular-material-fileupload": "^2.0.0",
"angular-screenfull": "^0.2.0",
"angular-tooltips": "^1.2.2",
"angular-webstorage-service": "^1.0.2",
"angular2-moment": "^1.9.0",
"angularfire2": "5.1.0",
"angularx-social-login": "^1.2.7",
"bootstrap": "^4.3.1",
"core-js": "^2.5.4",
"firebase": "^5.7.1",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"jquery": "^3.4.1",
"jspdf": "^1.4.1",
"localstorage-polyfill": "^1.0.1",
"moment": "^2.22.2",
"ng-simple-slideshow": "^1.2.8",
"ng-sticky": "^0.1.5",
"ng2-account-kit": "^1.0.2",
"ng2-pdf-viewer": "^5.2.4",
"ngx-cookie-service": "^1.0.10",
"ngx-hm-carousel": "^1.6.5-bata.1",
"ngx-mat-select-search": "^1.8.0",
"ngx-pagination": "^3.2.0",
"ngx-perfect-scrollbar": "^6.0.0",
"ngx-scroll-event": "^1.0.8",
"pepper-js": "0.0.2",
"protractor-jasmine2-html-reporter": "0.0.7",
"rxjs": "^6.0.0",
"rxjs-compat": "^6.0.0",
"screenfull": "^3.3.2",
"sitemap-generator": "^8.4.2",
"sitemap-generator-cli": "^4.3.0",
"ui-carousel": "^0.2.0",
"videogular2": "^6.3.0",
"zone.js": "^0.8.24"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.10.0",
"@angular/cli": "^7.0.3",
"@angular/compiler-cli": "7.0.1",
"@angular/platform-server": "^7.2.16",
"@types/core-js": "^2.5.0",
"@types/jasmine": "~2.8.0",
"@types/jasminewd2": "^2.0.3",
"@types/node": "^6.0.45",
"build-prod-ngsw": "ng build --prod && npm run ngsw-config && npm run ngsw-copy",
"compression-webpack-plugin": "^1.1.11",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^3.1.1",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.4",
"karma-htmlfile-reporter": "^0.3.7",
"karma-jasmine": "^1.1.2",
"karma-jasmine-html-reporter": "^1.4.0",
"karma-phantomjs-launcher": "^1.0.2",
"lodash": "^4.16.2",
"ng-packagr": "^1.7.0",
"ngsw-config": "node_modules/.bin/ngsw-config dist src/ngsw-config.json",
"ngsw-copy": "cp node_modules/@angular/service-worker/ngsw-worker.js dist/",
"phantomjs-prebuilt": "^2.1.7",
"protractor": "~5.3.0",
"ts-loader": "^4.2.0",
"ts-node": "^5.0.1",
"tslint": "^5.9.1",
"typescript": "^3.1.1",
"webpack": "^4.41.5",
"webpack-cli": "^2.0.14",
"webpack-dev-server": "^2.11.5",
"webpack:server": "webpack --config webpack.server.config.js --progress --colors"
},
"repository": {}
}
Подскажите, пожалуйста, что еще можно сделать, чтобы избежать этих ошибок.