Rxjs: [rxjs v6] fromPromise not exported from index.d.ts

Created on 4 Apr 2018  路  9Comments  路  Source: ReactiveX/rxjs

RxJS version:
6.0.0-rc.0

Code to reproduce:
import { fromPromise } from 'rxjs';

Expected behavior:
exported fromPromise

Actual behavior:
Module '".../node_modules/rxjs/index"' has no exported member 'fromPromise'

Most helpful comment

Yes. Use from. Will have an updated migration guide soon.

All 9 comments

RxJS:
6.0.0-rc.0

I have a similar problems with:

node_modules/rxjs-compat/add/operator/catch.d.ts(1,10): error TS2305: Module '"node_modules/rxjs/internal-compatibility/index"' has no exported member '_catch'.
node_modules/rxjs-compat/add/operator/combineLatest.d.ts(1,10): error TS2305: Module '"node_modules/rxjs/internal-compatibility/index"' has noexported member 'combineLatest'.
node_modules/rxjs-compat/add/operator/filter.d.ts(1,10): error TS2305: Module '"node_modules/rxjs/internal-compatibility/index"' has no exported member 'filter'.
node_modules/rxjs-compat/add/operator/map.d.ts(1,10): error TS2305: Module '"/node_modules/rxjs/internal-compatibility/index"' has no exported member 'map'.
node_modules/rxjs-compat/add/operator/mergeAll.d.ts(1,10): error TS2305: Module '"node_modules/rxjs/internal-compatibility/index"' has no exported member 'mergeAll'.

I'm able to fix everything from this by importing it from 'rxjs/internal/operators/', but for _catch there's no such a file.

Any suggestion / fix / help / workaround would be very pleasant.

catch was replaced with pipeable catchError since rxjs v5.5

you just need to change
observable.catch(...)
with
observable.pipe(catchError(...))

I've got problem with this import. ng serve is unable to find _catch in whole rxjs project, and I cannot run my project. Any suggestions about this ?

Seems like you're supposed to use import { from } from 'rxjs'; instead.

@larrifax yup, as far as I can see this isnt mentioned in the changelog

refer https://github.com/ReactiveX/rxjs/pull/3391 , I think it's just missing changelog.

/cc @benlesh to confirm and close if so.

Yes. Use from. Will have an updated migration guide soon.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benlesh picture benlesh  路  3Comments

jakovljevic-mladen picture jakovljevic-mladen  路  3Comments

giovannicandido picture giovannicandido  路  4Comments

samherrmann picture samherrmann  路  3Comments

dooreelko picture dooreelko  路  3Comments