Warm tip: This article is reproduced from serverfault.com, please click

javascript-在“ rxjs”中找不到导出“分区”

(javascript - export 'partition' was not found in 'rxjs')

发布于 2019-08-19 06:08:47

我正在尝试在我的 Angular 项目中使用ng-http-loader。我已经安装了ng-http-loader软件包。在编译项目时出现错误。错误是

在“ rxjs”中找不到导出“分区”。

package.json

"dependencies": {
  "@angular/animations": "^8.2.2",
  "@angular/cdk": "^8.1.3",
  "@angular/common": "~8.0.0",
  "@angular/compiler": "~8.0.0",
  "@angular/core": "~8.0.0",
  "@angular/forms": "~8.0.0",
  "@angular/material": "^8.1.3",
  "@angular/platform-browser": "~8.0.0",
  "@angular/platform-browser-dynamic": "~8.0.0",
  "@angular/router": "~8.0.0",
  "hammerjs": "^2.0.8",
  "ng-http-loader": "^6.0.1",
  "rxjs": "^6.5.2",
  "tslib": "^1.9.0",
  "zone.js": "~0.9.1"
},
Questioner
Shahrukh
Viewed
1
darkie8 2019-11-26 16:57:17

转到ng-http-loader.js。你会看到以下内容

import { ReplaySubject,partition, merge, timer } from 'rxjs';
import { finalize, switchMap, debounce, distinctUntilChanged, tap} from 
'rxjs/operators';

你只需要将它们更改为:

import { ReplaySubject, merge, timer } from 'rxjs';
import { finalize, switchMap, debounce, distinctUntilChanged, tap, partition } 
from 'rxjs/operators';