I’m currently trying to follow this nrgx / pouchdb tutorial:
I believe I have made the appropriate changes to update my code for the latest deployed version of Ionic 2 based on the change log, however I am still getting the following typescript error:
TypeScript error: C:/Projects/ionic2-tutorial-ngrx/node_modules/@ngrx/store/ng2.d.ts(5,23): Error TS2305: Module ‘“C:/Projects/ionic2-tutorial-ngrx/node_modules/@angular/core/index”’ has no exported member ‘ModuleWithProviders’.
I’ve googled to no end and I can’t find out what the issue is. Has anyone else encountered this issue and knows what the solution is? Is it perhaps my typings?
This occurred after installation of ngrx/store (1.0.2) and ngrx/effects (2.0.0-beta2) via npm in my project.
It was related to these errors after npm install: npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14 npm WARN @ngrx/effects@2.0.0-beta.2 requires a peer of @angular/core@^2.0.0-rc.5 but none was installed. npm WARN @ngrx/store@2.1.2 requires a peer of @angular/core@^2.0.0-rc.5 but none was installed.
It’s related to the fact that the latest versions of ngrx/store and ngrx/effects require angular rc5, but this won’t work with Ionic2 Beta 11, but like mentioned by mhartington rc5 will be used in the next version
So until then, I’m downgrading ngrx/store and effects
ModuleWithProviders is used in ngrx/store since this commit: Link
So I switched to ngrx/store@2.1.0 und ngrx/effects@1.0.0:
`
npm uninstall @ngrx/store --save
npm uninstall @ngrx/effects --save
npm install @ngrx/store@2.0.1 --save (<- sorry I stated the wrong version here before. This is the correct one.)
npm install @ngrx/effects@1.0.0 --save
If this still doesn’t work, try to manually delete the store and effects folders under node_modules/ and uninstall and install again.
`
Hope this works for you.