1
votes

I have got following issues when i import StoreModule.provideStore({ counter: todos });

ERROR in node_modules/@ngrx/core/src/operator/enterZone.d.ts(1,10): error TS2305: Module '"E:/work/nrgx-store2/my-dream-app/node_modules/rxjs/Operator"' has no exported member 'Operator'. node_modules/@ngrx/core/src/operator/enterZone.d.ts(2,10): error TS2305: Module '"E:/work/nrgx-store2/my-dream-app/node_modules/rxjs/Subscriber"' has no exported member 'Subscriber'. node_modules/@ngrx/core/src/operator/enterZone.d.ts(3,10): error TS2305: Module '"E:/work/nrgx-store2/my-dream-app/node_modules/rxjs/Observable"' has no exported member 'Observable'. node_modules/@ngrx/core/src/operator/leaveZone.d.ts(1,10): error TS2305: Module '"E:/work/nrgx-store2/my-dream-app/node_modules/rxjs/Operator"' has no exported member 'Operator'. node_modules/@ngrx/core/src/operator/leaveZone.d.ts(2,10): error TS2305: Module '"E:/work/nrgx-store2/my-dream-app/node_modules/rxjs/Subscriber"' has no exported member 'Subscriber'. node_modules/@ngrx/core/src/operator/leaveZone.d.ts(3,10): error TS2305: Module '"E:/work/nrgx-store2/my-dream-app/node_modules/rxjs/Observable"' has no exported member 'Observable'. node_modules/@ngrx/core/src/operator/select.d.ts(1,10): error TS2305: Module '"E:/work/nrgx-store2/my-dream-app/node_modules/rxjs/Observable"' has no exported member 'Observable'. node_modules/@ngrx/store/src/dispatcher.d.ts(1,10): error TS2305: Module '"E:/work/nrgx-store2/my-dream-app/node_modules/rxjs/BehaviorSubject"' has no exported member 'BehaviorSubject'. node_modules/@ngrx/store/src/ng2.d.ts(1,10): error TS2305: Module '"E:/work/nrgx-store2/my-dream-app/node_modules/@angular/core/core"' has no exported member 'OpaqueToken'. node_modules/@ngrx/store/src/reducer.d.ts(1,10): error TS2305: Module '"E:/work/nrgx-store2/my-dream-app/node_modules/rxjs/BehaviorSubject"' has no exported member 'BehaviorSubject'. node_modules/@ngrx/store/src/state.d.ts(1,10): error TS2305: Module '"E:/work/nrgx-store2/my-dream-app/node_modules/rxjs/BehaviorSubject"' has no exported member 'BehaviorSubject'.

  @NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    StoreModule.provideStore({ counter: todos })
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

package.log

    {
  "name": "my-dream-app",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~7.2.0",
    "@angular/common": "~7.2.0",
    "@angular/compiler": "~7.2.0",
    "@angular/core": "~7.2.0",
    "@angular/forms": "~7.2.0",
    "@angular/platform-browser": "~7.2.0",
    "@angular/platform-browser-dynamic": "~7.2.0",
    "@angular/router": "~7.2.0",
    "@ngrx/core": "^1.2.0",
    "@ngrx/store": "^2.2.3",
    "core-js": "^2.5.4",
    "rxjs": "~6.3.3",
    "tslib": "^1.9.0",
    "zone.js": "~0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.13.0",
    "@angular/cli": "~7.3.6",
    "@angular/compiler-cli": "~7.2.0",
    "@angular/language-service": "~7.2.0",
    "@types/node": "~8.9.4",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~3.2.2"
  }
}
1
Have you tried deleting your node_modules folder and doing a new yarn or npm install?user9298624
can you check if your imported in right way because StoreModule.provideStore seams to be old way before update and now its StoreModule.forRoot...Sorry if i am wrong but i just scrolled read me file from github.com/ngrx/platform/tree/master/docs/storeBognar

1 Answers

0
votes

These are all dependencies of RxJS. I see that you have it listed on the package JSON. Try running

npm install rxjs