1
votes

Trying to use @angular/flex-layout in an existing npm-enabled Ionic 3 project.

Adding "FlexLayoutModule" to my main module's imports won't allow the app to start, saying that: cannot find module "rxjs/operators" is the cause.

Already cleared node_module, npm install, reinstalled Ionic CLI. Nothing helps. Could it be a version conflict? Moreover, I'm already using Observables in this project. I don't get it. And the import of "FlexLayoutModule" is in cause of this issue (disabling the import removes the issue).

Anyone could be successful at using flex-layout with ionic? I've seen this plunk, but it uses system.js, so not 100% reproducing my goal.

http://plnkr.co/edit/y8R0MF?p=info

Edit: a more verbose issue:

Uncaught (in promise): Error: Cannot find module "rxjs/operators" Error: Cannot find module "rxjs/operators" at Object.580 (http://localhost:8100/build/22.main.js:319:7) at webpack_require (http://localhost:8100/build/main.js:48:30) at Object.1021 (http://localhost:8100/build/22.main.js:11:79) at webpack_require (http://localhost:8100/build/main.js:48:30) at http://localhost:8100/build/main.js:122015:10 at t.invoke (http://localhost:8100/build/polyfills.js:3:9283) at Object.onInvoke (http://localhost:8100/build/main.js:4650:37) at t.invoke (http://localhost:8100/build/polyfills.js:3:9223) at r.run (http://localhost:8100/build/polyfills.js:3:4452) at http://localhost:8100/build/polyfills.js:3:14076

1

1 Answers

2
votes

I'm getting a similar error with Angular CLI. Everything is OK until I include FlexLayoutModule in the app's NgModule imports. Then I get the error:

Module not found: Error: Can't resolve 'rxjs/operators' in 'D:\dev\Vms.Signup.Client\node_modules\@angular\flex-layout\esm5'

I updated to the latest rxjs and that seems to have fixed it.