в настоящее время я пытаюсь перейти с углового 5,2 на угловое 7,0.Пока мне удалось запустить приложение через ng-сервер, но если я попытаюсь запустить тесты, я получу следующее исключение:
ERROR in src/app/components/common/grid/responsive-grid.directive.spec.ts(23,3): error TS2416: Property 'subscribe' in type 'DummyObservableMedia' is not assignable to the same property in base type 'ObservableMedia'.
Type '(next?: (value: MediaChange) => void, error?: (error: any) => void, complete?: () => void) => Subscription' is not assignable to type '{ (next?: (value: MediaChange) => void, error?: (error: any) => void, complete?: () => void): Subscription; (observer?: PartialObserver<MediaChange>): Subscription; }'.
Types of parameters 'next' and 'observer' are incompatible.
Type 'PartialObserver<MediaChange>' is not assignable to type '(value: MediaChange) => void'.
Type 'NextObserver<MediaChange>' is not assignable to type '(value: MediaChange) => void'.
Type 'NextObserver<MediaChange>' provides no match for the signature '(value: MediaChange): void'.
src/app/components/common/grid/responsive-grid.directive.spec.ts(32,45): error TS2345: Argument of type 'DummyObservableMedia' is not assignable to parameter of type 'ObservableMedia'.
Types of property 'subscribe' are incompatible.
Type '(next?: (value: MediaChange) => void, error?: (error: any) => void, complete?: () => void) => Subscription' is not assignable to type '{ (next?: (value: MediaChange) => void, error?: (error: any) => void, complete?: () => void): Subscription; (observer?: PartialObserver<MediaChange>): Subscription; }'.
Types of parameters 'next' and 'observer' are incompatible.
Type 'PartialObserver<MediaChange>' is not assignable to type '(value: MediaChange) => void'.
Type 'NextObserver<MediaChange>' is not assignable to type '(value: MediaChange) => void'.
src/app/components/common/grid/responsive-grid.directive.spec.ts(35,45): error TS2345: Argument of type 'DummyObservableMedia' is not assignable to parameter of type 'ObservableMedia'.
src/app/components/common/grid/responsive-grid.directive.spec.ts(38,45): error TS2345: Argument of type 'DummyObservableMedia' is not assignable to parameter of type 'ObservableMedia'.
src/app/components/common/grid/responsive-grid.directive.spec.ts(41,45): error TS2345: Argument of type 'DummyObservableMedia' is not assignable to parameter of type 'ObservableMedia'.
src/app/components/common/grid/responsive-grid.directive.spec.ts(44,45): error TS2345: Argument of type 'DummyObservableMedia' is not assignable to parameter of type 'ObservableMedia'.
src/app/components/common/grid/responsive-grid.directive.spec.ts(50,45): error TS2345: Argument of type 'DummyObservableMedia' is not assignable to parameter of type 'ObservableMedia'.
Я выполнил миграцию, как описано в Руководстве, описанном https://update.angular.io/.
Кажется, проблема в флекс-макете.Я попробовал все, что упомянуто в этом Посте https://github.com/angular/flex-layout/issues/827, но понижение flex-layout до 6.0.0, к сожалению, не помогло, также понижение rxjs и rxjs-comabt не помогло.Вот мой пакет JSON:
{
"name": "XXX",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"postinstall": "node patch.js",
"ng": "ng",
"start": "ng serve --live-reload=false --host 0.0.0.0",
"build": "ng build --progress=false",
"build-prod": "ng build --progress=false --prod --build-optimizer=true --output-hashing=none",
"test": "ng test --sourcemaps=false",
"test-ci": "ng test --browser ChromeHeadless_no_sandbox --watch=false --progress=false --sourcemaps=false",
"lint": "ng lint --type-check",
"e2e": "ng e2e --watch=false --progress=false --serve=false",
"e2e-ci": "ng e2e --watch=false --progress=false --serve=false --config protractor-ci.conf.js"
},
"private": true,
"dependencies": {
"@agm/core": "^1.0.0-beta.5",
"@agm/snazzy-info-window": "^1.0.0-beta.5",
"@angular/animations": "^7.1.0",
"@angular/cdk": "^7.1.0",
"@angular/common": "^7.1.0",
"@angular/compiler": "^7.1.0",
"@angular/core": "^7.1.0",
"@angular/flex-layout": "7.0.0-beta.19",
"@angular/forms": "^7.1.0",
"@angular/http": "^7.1.0",
"@angular/material": "^7.1.0",
"@angular/platform-browser": "^7.1.0",
"@angular/platform-browser-dynamic": "^7.1.0",
"@angular/platform-server": "^7.1.0",
"@angular/router": "^7.1.0",
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"@types/crypto-js": "^3.1.43",
"@types/jsonwebtoken": "^8.3.0",
"angular-sortablejs": "^2.6.0",
"chart.js": "^2.7.3",
"classlist.js": "^1.1.20150312",
"core-js": "^2.5.7",
"crypto-js": "^3.1.9-1",
"dexie": "^2.0.4",
"gaugeJS": "^1.3.6",
"hammerjs": "^2.0.8",
"intl": "^1.2.5",
"jasmine": "^3.3.0",
"json2csv": "^4.3.1",
"jsonwebtoken": "^8.4.0",
"moment": "^2.22.2",
"ngx-gauge": "^1.0.0-beta.4",
"reinstall": "^2.0.0",
"snazzy-info-window": "^1.1.1",
"sortablejs": "^1.7.0",
"stream": "0.0.2",
"tslib": "^1.9.0",
"url-parse": "^1.4.4",
"uuid": "^3.3.2",
"web-animations-js": "^2.3.1",
"web3": "^1.0.0-beta.36",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.11.0",
"@angular/cli": "^7.1.0",
"@angular/compiler-cli": "^7.1.0",
"@types/jasmine": "^3.3.0",
"@types/jasminewd2": "^2.0.6",
"@types/node": "^10.1.4",
"codelyzer": "^4.5.0",
"express": "^4.16.4",
"http-proxy-middleware": "^0.19.1",
"jasmine-core": "~3.3.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^3.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^2.0.4",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"karma-mocha-reporter": "^2.2.5",
"protractor": "^5.4.1",
"rxjs": "6.3.3",
"rxjs-compat": "6.3.3",
"ts-node": "^7.0.1",
"tslint": "^5.11.0",
"tslint-defocus": "^2.0.6",
"typescript": "~3.1.6",
"webpack-dev-server": "^3.1.10"
}
}
Заранее спасибо:)