Clarity: after ng add, can't resolve rxjs objects on ng serve

Created on 4 May 2018  Â·  4Comments  Â·  Source: vmware/clarity

Select one ... (check one with "x")

[x] bug
[ ] feature request
[ ] enhancement

Expected behavior


After updating npm, @angular/cli, creating a new angular application (version 6), and adding clarity with ng add @clr/angular@next should create an application that can be served up locally.

Actual behavior


Upon running ng serve after following the steps mentioned above, I receive the following error message:

$ ng serve
** Angular Live Development Server is listening on localhost: 4200, open your browser on http://localhost:4200/ **

Date: 2018-05-04T04:22:29.158Z
Hash: bb128a78f443db1afaee
Time: 10405ms
chunk {main} main.js, main.js.map (main) 13.4 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 226 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.4 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 563 kB  [rendered]
chunk {styles} styles.js, styles.js.map (styles) 419 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 4.7 MB [initial] [rendered]

ERROR in ./node_modules/@clr/angular/esm5/clr-angular.js
Module not found: Error: Can't resolve 'rxjs/BehaviorSubject' in 'C:\Users\jakeh\source\repos\jakehockey10\node_modules\@clr\angular\esm5'
ERROR in ./node_modules/@clr/angular/esm5/clr-angular.js
Module not found: Error: Can't resolve 'rxjs/Subject' in 'C:\Users\jakeh\source\repos\jakehockey10\node_modules\@clr\angular\esm5'
ERROR in ./node_modules/@clr/angular/esm5/clr-angular.js
Module not found: Error: Can't resolve 'rxjs/operator/first' in 'C:\Users\jakeh\source\repos\jakehockey10\node_modules\@clr\angular\esm5'
ERROR in ./node_modules/@clr/angular/esm5/clr-angular.js
Module not found: Error: Can't resolve 'rxjs/operators/map' in 'C:\Users\jakeh\source\repos\jakehockey10\node_modules\@clr\angular\esm5'
i ï½¢wdmï½£: Failed to compile.

Reproduction of behavior


  • Include a link to the reproduction scenario you created by forking one of the Clarity Plunker Templates:




    npm i -g @angular/cli
    ng new my-app --style scss --routing
    cd my-app
    ng add @clr/angular@next
    ng serve

Environment details

  • Angular version: 4.x.x
$ ng -v

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / â–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 6.0.0
Node: 8.11.1
OS: win32 x64
Angular: 6.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.0
@angular-devkit/build-angular     0.6.0
@angular-devkit/build-optimizer   0.6.0
@angular-devkit/core              0.6.0
@angular-devkit/schematics        0.6.0
@ngtools/json-schema              1.1.0
@ngtools/webpack                  6.0.0
@schematics/angular               0.6.0
@schematics/update                0.6.0
rxjs                              6.1.0
typescript                        2.7.2
webpack                           4.6.0

  • Clarity version:
    "@clr/angular": "^0.11.15",
  • OS and version:
    Windows 10
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Most helpful comment

This is a known limitation that isn't well published, but you'll need to try adding the https://www.npmjs.com/package/rxjs-compat package to help with these import issues. This is a preview of our schematics, which we'll be updating very soon for standalone v6 compatibility (see PR #2238).

All 4 comments

This is a known limitation that isn't well published, but you'll need to try adding the https://www.npmjs.com/package/rxjs-compat package to help with these import issues. This is a preview of our schematics, which we'll be updating very soon for standalone v6 compatibility (see PR #2238).

@gnomeontherun: Can we close this issue?

npm install rxjs-compat
https://github.com/vmware/clarity/issues/2242 by MogauGeeky

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.

Was this page helpful?
0 / 5 - 0 ratings