ngsx和Angular版本5.5

时间:2018-04-13 14:21:05

标签: angular package.json

我首先在安装和设置ngx时遇到了一些问题。我将我的package.json文件与来自ngsx github master的文件进行了比较,看到大多数安装位于v6 +。我收到这个奇怪的错误信息:...... TS2305..rxjs / Rx"'没有导出的成员' OperatorFunction'。 rxjs version = 5.5.6。 我通过从ngsx master复制package.json文件解决了这个问题,但是我试图挖掘真正发生的事情.. :-)这是两个package.json文件的副本。一个是工作,另一个不是。

很明显存在版本差异,但我试图替换大多数角色的东西,我不能使用的版本,但仍然得到相同的错误。不知道ngsx是否对rxjs版本等非常敏感。

THIS IS NOT WORKING: "dependencies": { "@angular/animations": "^5.2.0", "@angular/common": "^5.2.0", "@angular/compiler": "^5.2.0", "@angular/core": "^5.2.0", "@angular/forms": "^5.2.0", "@angular/http": "^5.2.0", "@angular/platform-browser": "^5.2.0", "@angular/platform-browser-dynamic": "^5.2.0", "@angular/router": "^5.2.0", "@ngxs/devtools-plugin": "^3.0.0-rc.1", "@ngxs/logger-plugin": "^3.0.0-rc.1", "@ngxs/store": "^3.0.0-rc.1", "core-js": "^2.4.1", "rxjs": "^5.5.6", "zone.js": "^0.8.19" }, "devDependencies": { "@angular/cli": "~1.7.3", "@angular/compiler-cli": "^5.2.0", "@angular/language-service": "^5.2.0", "@types/jasmine": "~2.8.3", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "^4.0.1", "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", "ts-node": "~4.1.0", "tslint": "~5.9.1", "typescript": "~2.5.3" } THIS IS WORKING: "devDependencies": { "@angular/cli": "~1.7.3", "@angular/common": "^6.0.0-rc.3", "@angular/compiler": "^6.0.0-rc.3", "@angular/compiler-cli": "^6.0.0-rc.3", "@angular/core": "^6.0.0-rc.3", "@angular/forms": "^6.0.0-rc.3", "@angular/http": "^6.0.0-rc.3", "@angular/language-service": "^6.0.0-rc.3", "@angular/platform-browser": "^6.0.0-rc.3", "@angular/platform-browser-dynamic": "^6.0.0-rc.3", "@angular/router": "^6.0.0-rc.3", "@commitlint/cli": "^6.1.3", "@commitlint/config-conventional": "^6.1.3", "@types/fs-extra": "^5.0.1", "@types/googlemaps": "^3.29.2", "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.2", "@types/node": "~9.6.0", "@types/semver": "^5.5.0", "codelyzer": "^4.0.0", "core-js": "^2.4.1", "fs-extra": "^5.0.0", "husky": "^0.15.0-rc.13", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "lint-staged": "^7.0.0", "mock-socket": "^7.1.0", "ng-packagr": "^2.3.0", "prettier": "^1.8.2", "rxjs": "^6.0.0-rc.1", "rxjs-compat": "^6.0.0-beta.1", "ts-node": "~5.0.1", "tsickle": "^0.27.2", "tslib": "^1.9.0", "tslint": "^5.8.0", "typescript": "~2.7.2", "zone.js": "^0.8.26" }, "dependencies": { "@ngxs/devtools-plugin": "^3.0.0-rc.1", "@ngxs/logger-plugin": "^3.0.0-rc.1", "@ngxs/store": "^3.0.0-rc.1" }

1 个答案:

答案 0 :(得分:0)

只需要更新RxJS版本。我将它升级到^ 5.6.0-forward-compat.4并且没有更多错误。

[Source]