angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

rxjs-compat NOT automatically installed

Open jtsom opened this issue 8 years ago • 16 comments

Per the paragraph on the announcement blog page:

For example, the command ng update @angular/core will update all of the Angular framework packages as well as RxJS and TypeScript, and will run any schematics available on these packages to keep you up to date. As part of this one command, we’ll automatically install rxjs-compat into your application to make the adoption of RxJS v6 smoother.

However, after running the ng upgrade commands, rxjs-compat was NOT automatically installed. When I ran my app, there were several errors related to rxjs

node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
src/app/students/students.component.ts(2,10): error TS2305: Module '"/Users/john/Dev/DotNet/TimeTracker/node_modules/rxjs/Observable"' has no exported member 'Observable'.
src/app/students/students.service.ts(3,10): error TS2305: Module '"/Users/john/Dev/DotNet/TimeTracker/node_modules/rxjs/Observable"' has no exported member 'Observable'.

Versions

Angular CLI: 6.0.0
Node: 10.0.0
OS: darwin 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/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

Repro steps

  • Update an existing app, per directions on update.angular.io

Observed behavior

rxjs-compat was not added to package.json automatically

Desired behavior

Per the docs, rxjs-compat should have been installed.

Mention any other details that might be useful (optional)

jtsom avatar May 04 '18 10:05 jtsom

same issues here

shkarab avatar May 04 '18 18:05 shkarab

same here

CanKer avatar May 04 '18 19:05 CanKer

Same here.

AlexanderFalconi avatar May 04 '18 22:05 AlexanderFalconi

same

FreakyMithril avatar May 05 '18 08:05 FreakyMithril

same issue.

This package allowed me to keep working:

npm install [email protected]

ivancas84 avatar May 06 '18 18:05 ivancas84

See .. https://update.angular.io/ ..

In the last parts:

"Once you and all of your dependencies have updated to RxJS 6, remove rxjs-compat."

MrJmpl3 avatar May 07 '18 06:05 MrJmpl3

Same - I tried to run as well ng update rxjs, but it did not add rxjs-compat to the package.json, neither added it to the npm list.

ElisePatrikainen avatar May 08 '18 11:05 ElisePatrikainen

Same here.

sachinpachori avatar May 08 '18 16:05 sachinpachori

I too have the same issue but resolved by

npm install [email protected]

Group10Chennai avatar May 24 '18 04:05 Group10Chennai

@here removing rxjs-compat after the migration still throw the same error

sreeksp avatar Jul 07 '18 00:07 sreeksp

As time passes, fewer users are still updating to Angular 6, so lowering the priority. Sorry this wasn't fixed already.

alexeagle avatar Jul 28 '18 21:07 alexeagle

same issue here :(

Saif-Ihsan avatar Oct 28 '18 12:10 Saif-Ihsan

same here

buka102 avatar Dec 20 '18 10:12 buka102

npm i rxjs-compat

Add these on o your root folder

yogeshpatil143 avatar Dec 28 '18 09:12 yogeshpatil143

rxjs-compat should not longer be needed. However if this issue is still occurring for anyone, the rxjs package itself contains the necessary migrations to install the rxjs-compat package. Please open an issue with rxjs if the update migrations are not being properly executed when updating from a pre-6.0 version of rxjs to a new version via the ng update command.

clydin avatar May 27 '20 01:05 clydin

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.