Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Angular V6 and RXJS V6 - error TS2307: Cannot find module 'rxjs-compat/BehaviorSubject' #28

Closed
AnthonyNahas opened this issue May 7, 2018 · 1 comment · Fixed by #30

Comments

@AnthonyNahas
Copy link

AnthonyNahas commented May 7, 2018

- [ -] bug report -> please search issues before submitting
- [x ] feature request
- [ ] question

OS and Version?

macOs HighSierra

Versions

Angular CLI: 6.0.0
Node: 8.11.1
OS: darwin x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.0
@angular-devkit/core         0.6.0
@angular-devkit/schematics   0.6.0
@schematics/angular          0.6.0
@schematics/update           0.6.0
rxjs                         6.1.0
typescript     

Repro steps

  1. update angular to v6
  2. this implicate to update rxjs to version 6

or try local the demo app of ngx-material-pages

  1. clone the repo https://github.com/AnthonyNahas/ngx-material-pages.git
  2. cd ngx-material-pages
  3. npm i && gulp link
  4. cd demo && npm i
  5. npm start or ng serve

The log given by the failure

> [email protected] start /Users/.../ngx-material-pages/demo
> ng serve

** NG Live Development Server is listening on localhost:4200, open your browser on http:https://localhost:4200/ **

Date: 2018-05-07T19:35:54.533ZERROR in node_modules/ngx-highlightjs/highlight.service.d.ts(1,10): error TS2305: Module '"/Users/.../ngx-material-pages/demo/node_modules/rxjs/BehaviorSubject"' has no exported member 'BehaviorSubject'.

Hash: node_modules/rxjs/BehaviorSubject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/BehaviorSubject'.041760bcb8281eba4132

Time: 
5580ms
chunk {inline} inline.bundle.js (inline) 3.85 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 2.91 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 577 bytes [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 881 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 852 kB [initial] [rendered]
webpack: Failed to compile.

Desired functionality

to compile and serve, something like below...

** NG Live Development Server is listening on localhost:4200, open your browser on http:https://localhost:xxxx/ **
Date: 2018-05-07T19:41:29.730Z
Hash: ff55ace6328f73835229
Time: 11611ms
chunk {inline} inline.bundle.js (inline) 3.85 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 109 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 554 kB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 881 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 17.1 MB [initial] [rendered]

webpack: Compiled successfully.

Mention any other details that might be useful

here is the official migration guide of rxjs v6

@changhuixu
Copy link

changhuixu commented May 7, 2018

interesting... I was planning to submit the same issue :)

btw, I am updating some internal npm packages, which use ngx-highlightjs to show sample usages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants