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'
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.
Most helpful comment
Yes. Use
from. Will have an updated migration guide soon.