Skip to content

upgrading to rxjs to 6.0.0-beta.1 fails with Error: Can't resolve 'rxjs/operator/share'  #10058

@xmlking

Description

@xmlking

Versions

Angular CLI: 1.7.3
Node: 9.9.0
OS: darwin x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.7.3
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.5.3
webpack: 3.11.0

Repro steps

  • Step 1
ng new test
  • Step 2

According to RxJS Update Guide https://goo.gl/osWFzo
in package.json replace

    "rxjs": "^5.5.6"

with

    "rxjs": "^6.0.0-beta.1",
    "rxjs-compat": "^6.0.0-beta.1",
  • Step 3
ng serve

Observed behavior

 $ ng serve
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2018-03-24T19:09:06.172Z
Hash: 5362f398b275ad9aa305
Time: 5380ms
chunk {inline} inline.bundle.js (inline) 3.85 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 17.9 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 549 kB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 41.5 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 7.87 MB [initial] [rendered]

ERROR in ./node_modules/@angular/core/esm5/core.js
Module not found: Error: Can't resolve 'rxjs/operator/share' in 'test/node_modules/@angular/core/esm5'

Desired behavior

App should start normally

Mention any other details that might be useful (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions