我正在使用旧代码创建一个角度库,因此我使用 generate-angular2-library 创建了一个新的库项目。然后我遇到了这个错误
这是我的效果代码 -
@Effect() addProduct$ = this.actions$
.ofType(spsCart.CART_ADD_PRODUCT)
.map(toPayload)
.withLatestFrom(this.store$) // -------- **ERROR OCCURES HERE**
.switchMap(([payload, storeState]) => {
-- MY CODE
});
这是我的package.json -
"devDependencies": {
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/compiler-cli": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/http": "4.4.3",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@compodoc/compodoc": "^1.0.0-beta.10",
"@types/jasmine": "2.5.53",
"@types/node": "~6.0.60",
"angular-in-memory-web-api": "^0.3.2",
"codelyzer": "~3.2.0",
"concurrently": "^3.4.0",
"core-js": "^2.4.1",
"del": "^2.2.2",
"gulp": "^3.9.1",
"gulp-rename": "^1.2.2",
"gulp-rollup": "^2.15.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"lite-server": "^2.3.0",
"node-sass": "^4.5.2",
"node-sass-tilde-importer": "^1.0.0",
"node-watch": "^0.5.2",
"protractor": "~5.1.2",
"rollup": "^0.49.3",
"run-sequence": "^1.2.2",
"rxjs": "^5.4.3",
"systemjs": "^0.20.12",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2",
"zone.js": "^0.8.14"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"@ngrx/effects": "^4.1.1",
"@ngrx/store": "^4.1.1",
"@ngrx/store-devtools": "^4.1.1"
}
我不确定如果因为版本升级而收到此错误。或者我做错了什么。你能帮忙吗?在此先感谢
答案 0 :(得分:0)
这个问题解决了,问题是由于rxjs升级。