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: email@example.com npm WARN @firstname.lastname@example.org requires a peer of @angular/core@^2.0.0-rc.5 but none was installed. npm WARN @email@example.com 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 firstname.lastname@example.org und email@example.com:
npm uninstall @ngrx/store --save
npm uninstall @ngrx/effects --save
npm install @firstname.lastname@example.org --save (<- sorry I stated the wrong version here before. This is the correct one.)
npm install @email@example.com --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.