Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue when importing/using Rxjs with 5.5.3 version #3155

Closed
srcook1 opened this issue Dec 3, 2017 · 13 comments
Closed

issue when importing/using Rxjs with 5.5.3 version #3155

srcook1 opened this issue Dec 3, 2017 · 13 comments

Comments

@srcook1
Copy link

srcook1 commented Dec 3, 2017

RxJS version:
5.5.3

Code to reproduce:
import Rx from 'rxjs/Rx'; //same with from 'rxjs'
let observable = new Rx.Subject();

Expected behavior:
a new Rx.Subject is created

Actual behavior:
no Rx.Subject is created, get an error:
TypeError: Cannot read property 'Subject' of undefined

Additional information:
This was working fine with 5.5.2 code, and broke with 5.5.3
node v8.9.1
breaks when running using babel, ex: node -r babel-register foo.js
works when running es modules nativly, ex: node --experimental-modules foo.mjs

@kwonoj
Copy link
Member

kwonoj commented Dec 3, 2017

This may related with #3025, haven't verified though. /cc @jasonaden .

@bridzius
Copy link

bridzius commented Dec 4, 2017

Can be fixed by doing import * as Rx from "rxjs/Rx".

The documentation should be fixed to reflect this, since the default import is still used in https://github.com/ReactiveX/rxjs#installation-and-usage

@ghost
Copy link

ghost commented Dec 4, 2017

Has import of the default been deprecated/removed or will it this be fixed in 5.5.4?

@salemdar
Copy link

salemdar commented Dec 4, 2017

Quick fix:
Path should be changed from rxjs/operators/index.js to rxjs/operators.js

But this is a breaking change for many people and should have been versioned accordingly. What are the plans for for 5.5.4?

askielboe added a commit to mO2tion/react-native-sensors that referenced this issue Dec 4, 2017
@benlesh
Copy link
Member

benlesh commented Dec 4, 2017

But this is a breaking change for many people and should have been versioned accordingly.

It is a regression, not an intentional breaking change. We'll try to get it fixed as soon as we can.

@jasonaden
Copy link
Collaborator

The steps above don't repro the issue for me. Can someone please provide a way to reproduce this? Ideally create a repo with the problem so we can clone and see the issue. There must be something with environments or tools that I'm not seeing when simply using the above steps.

@srcook1 @askielboe @salemdar

@srcook1
Copy link
Author

srcook1 commented Dec 4, 2017

@steveblue
Copy link

rxjs/operators/index.js is missing in rxjs 5.5.3 That seems to be the culprit in breaking our build. This should not have been changed! Now we have a library that was built on 5.5.2 that is breaking.

@jondot
Copy link

jondot commented Dec 5, 2017

I can verify this happening on React Native.

@paranoidjk
Copy link

same problem here.

@benlesh
Copy link
Member

benlesh commented Dec 5, 2017

Apparently 5.5.3 was built with the wrong (newer) version of TypeScript, and that's what's causing the issue. Will build properly and publish again soon.

benlesh added a commit that referenced this issue Dec 5, 2017
@benlesh
Copy link
Member

benlesh commented Dec 5, 2017

This should be resolved in 5.5.4 now.

@benlesh benlesh closed this as completed Dec 5, 2017
@lock
Copy link

lock bot commented Jun 6, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants