flex-layout icon indicating copy to clipboard operation
flex-layout copied to clipboard

ERROR in node_modules/@angular/flex-layout/core/typings/observable-media/observable-media.d.ts(1,22)

Open alvipeo opened this issue 8 years ago • 26 comments

Just created a new project with CLI, added Material, etc. Then added flex-layout. Now this:

ERROR in node_modules/@angular/flex-layout/core/typings/observable-media/observable-media.d.ts(1,22): error TS2724: Module '"E:/Documents/repos/UrekiNgx/node_modules/rxjs/Rx"' has no exported member 'Subscribable'. Did you mean 'Subscriber'?

?

alvipeo avatar Apr 08 '18 16:04 alvipeo

What version of RxJS do you have installed?

CaerusKaru avatar Apr 08 '18 16:04 CaerusKaru

"rxjs": "^5.5.8",
"zone.js": "^0.8.26"

alvipeo avatar Apr 08 '18 20:04 alvipeo

Can you post the repo in question to GitHub?

CaerusKaru avatar Apr 08 '18 20:04 CaerusKaru

https://github.com/alvipeo/flex-layout-not-working

alvipeo avatar Apr 08 '18 20:04 alvipeo

Built locally with no issue. Closing unless there's a case I missed. I build locally, ran npm i and npm i @angular/flex-layout and then added FlexLayoutModule to app.module.ts. ng serve and ng build --prod both work flawlessly except for the warnings about TypeScript 2.8

CaerusKaru avatar Apr 09 '18 16:04 CaerusKaru

saw the same issue...

tccyp001 avatar Apr 11 '18 21:04 tccyp001

looks like if use latest version("github:angular/flex-layout-builds") can see that issue, but if change to ^5.0.0-beta.14, it can build correctly.

tccyp001 avatar Apr 11 '18 21:04 tccyp001

That's because the nightly builds use RxJS v6. You can get around that by installing rxjs@forward-compat

CaerusKaru avatar Apr 11 '18 21:04 CaerusKaru

Encountered the same error.

npm i rxjs@forward-compat --save resolves the Subscribable however introduces

WARNING in C:/Users/Tyler/Documents/GitHub/tribot-app/node_modules/@angular/flex-layout/esm5/core.es5.js
289:43-49 "export 'inject' was not found in '@angular/core'

Downgrading to ^5.0.0-beta.14 as @tccyp001 suggested resolves all issues.

Tyler-V avatar Apr 14 '18 17:04 Tyler-V

Encountered this error, had ^5.0.0-beta.13, updated to ^5.0.0-beta.14 and I still face it. My rxjs is: ^5.5.6 Also tried with rxjs@forward-compat and while the Subscribable error is gone, I get a wall of warnings just like @Tyler-V says

tasos31 avatar Jun 26 '18 06:06 tasos31

I second @roneen31 . Followed the same steps and get a wall of the same errors as @Tyler-V. More on those here:

https://github.com/angular/material2/issues/10511

I also followed those steps and changed these versions:

"@angular/cdk": "^5.2.4", "@angular/material": "^5.2.4",

Again, no luck. Seems like the only way now to use flex-layout is to upgrade to Angular 6?

JoannaG33 avatar Jun 27 '18 09:06 JoannaG33

Still happening flex-17 and rxjs 6.2.2 and Angular 6.1.6 Anyone any ideas here?

inthegarage avatar Aug 30 '18 22:08 inthegarage

I run into similar issues with flex-layout from time to time. so I stopped using it completely. Just use CSS.

alvipeo avatar Aug 30 '18 22:08 alvipeo

@alvipeo seems to be all to do with the latest rxjs 6.3.0 which I had automatically moved onto. Ensure you stick to 6.2.2. I love node, I really do.

inthegarage avatar Aug 30 '18 23:08 inthegarage

"@angular/flex-layout": "^6.0.0-beta.17",
"rxjs": "^6.2.2",
"rxjs-compat": "^6.2.2",

Still happens

ghost avatar Aug 31 '18 11:08 ghost

@Shukarity Note you have ^6.2.2 and not ~6.2.2 or just 6.2.2 you are probably still downloading (and therefore using 6.3.0) please review your package.json

inthegarage avatar Aug 31 '18 13:08 inthegarage

Did, works Thanks :)

ghost avatar Aug 31 '18 22:08 ghost

@CaerusKaru Can this issue be reopened again? It's failing with 6.3.0 and flex 17. Thank you.

inthegarage avatar Sep 01 '18 10:09 inthegarage

@inthegarage Please update to beta 18. And see #827 for details

CaerusKaru avatar Sep 01 '18 12:09 CaerusKaru

Thanks @CaerusKaru as that requires (or seems to require TS 2.9) we'll have to take that route a little more carefully. I do get errors if I don't move to 2.9

inthegarage avatar Sep 01 '18 14:09 inthegarage