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

TypeError: Observable.of is not a function since rxjs 6.3.0 #4070

Closed
FrancescoBorzi opened this issue Aug 30, 2018 · 56 comments
Closed

TypeError: Observable.of is not a function since rxjs 6.3.0 #4070

FrancescoBorzi opened this issue Aug 30, 2018 · 56 comments

Comments

@FrancescoBorzi
Copy link

After updating rxjs from version 6.2.x to version 6.3.0, the following:

import 'rxjs/add/observable/of';
// or 
import { Observable } from 'rxjs/Observable';

Observable.of(...)

Are not working anymore. The only way to make it work now is by using:

import { of } from 'rxjs/observable/of';

of(...)

is this a bug or the intended behaviour? It looks a breaking change to me :(

@blakecallens
Copy link

blakecallens commented Aug 30, 2018

Confirmed. rxjs-compat isn't shimming this either. Forcing rxjs and rxjs-compat to 6.0.0 solved the issue for me.

@FrancescoBorzi
Copy link
Author

for me switching back to 6.2.1 solves the issue

@maroy1986
Copy link

maroy1986 commented Aug 30, 2018

We also hit that issue this afternoon when some coworker restarted their node_modules from scratch. Setting the version in package.json to force the usage of 6.2.2 fixed the issue. Unfortunately, we cannot drop usage of rxjs-compat package because we have external dependencies relying on it. otherwise, it would have fixed the issue. So basically anybody hitting this have 2 options :

  1. Force the previous version which is 6.2.2
  2. Drop rxjs-compat and do the full migration to 6.x.y according you don't have any external dependencies that rely on it by following this page: https://rxjs-dev.firebaseapp.com/guide/v6/migration

@alignsoft
Copy link

I had the same problem - I use Observable.of in a browser network monitoring service that's pervasive in my app. Nothing failed with an error, just silently stopped resolving router.navigate instructions. Trial and error round that rolling back rxjs/rxjs-compat from 6.3 to 6.2.2 resolved the issue. I'm noticing now that the rxjs-compat 6.3 package is no longer available.

@benlesh
Copy link
Member

benlesh commented Aug 30, 2018

Do you have a minimal reproduction? It seems to be working fine for me.

https://stackblitz.com/edit/typescript-5bgqvb

@Vienyame
Copy link

Force or reinstall exact version of rxjs@6.2.2 and rxjs-compat@6.2.2.

@pertrai1
Copy link
Contributor

pertrai1 commented Aug 31, 2018

I got the same result as @benlesh with rxjs@6.2.2 and rxjs-compat@6.2.2

https://stackblitz.com/edit/typescript-ihwwpn - note it changes the packages to 6.3 but you can fork and delete those packages and install the exact versions of 6.2.2

@jtsom
Copy link

jtsom commented Aug 31, 2018

Also tried updating a large-ish project to 6.3 and got the same errors - had to back down to 6.2.2.

@benlesh
Copy link
Member

benlesh commented Aug 31, 2018

Hey everyone, I'm still having a hard time creating even a minimal reproduction of this issue. Does anyone have a repository I can look at?

@benlesh
Copy link
Member

benlesh commented Aug 31, 2018

So far, creating a new project:

npm i rxjs rxjs-compat

app.js

const { Observable } = require('rxjs/Observable');

require('rxjs/add/observable/of');

Observable.of('test').subscribe(x => console.log(x));
node app.js

Outputs "test", just fine.

@benlesh
Copy link
Member

benlesh commented Aug 31, 2018

can everyone check to make sure they have rxjs-compat 6.3.0 as well?

@alignsoft
Copy link

I updated both rxjs and rxjs-compat from 6.2.2 to 6.3 and then noticed that router.navigate stopped firing. There was no error, and I logged the entire code process to confirm that everything worked right up to where the component should have navigated to the next component, and it just silently failed to do so. Reverting to 6.2.2 for both solved the issue.

Unfortunately my project is massive, and I can't easily create a minimal repo of the issue. Also, my issue may not actually be a result of the Observable.of issue, however I am making use of that extensively in the project, and this was the only issue that mirrored the symptom I was seeing.

I'm importing like this:

import { Observable, of, Subject, Subscription, forkJoin } from 'rxjs';

@williamzhao87
Copy link

I got a similar error on update from 6.2.2 to 6.3 after running ng update rxjs

$ ng serve
...\node_modules\rxjs\internal\Observable.js:27
sink._addParentTeardownLogic(this.source || (config_1.config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
^

TypeError: sink._addParentTeardownLogic is not a function
at Observable.subscribe (...\node_modules\rxjs\internal\Observable.js:27:18)
at MergeMapOperator.call
...

@aubweb9
Copy link

aubweb9 commented Sep 3, 2018

Hi,

I recently upgraded an app to angular-cli 6 and I've got the following error when I try to start the project :
node_modules@angular\cli\node_modules\rxjs\internal\Observable.js:27
sink._addParentTeardownLogic(this.source || (config_1.config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
^

TypeError: sink._addParentTeardownLogic is not a function
at Observable.subscribe

(EDIT by @benlesh: Removed large package.json and error message copy paste to keep the thread clean, since this was off-topic.)

Is there any fix/solution for this issue right now ?

Thanks.

@alignsoft
Copy link

Anyone tested this with rxjs/rxjs-compat 6.3.1?

@benlesh
Copy link
Member

benlesh commented Sep 4, 2018

@aubweb9 Thiat's a different issue than what was reported in this issue, but it should be resolved with: #4078

There will be a patch as soon as that passes CI and lands

@jtsom
Copy link

jtsom commented Sep 4, 2018

Just updated to 6.3.2 of rxjs and rxjs-compat, and still seeing tons of errors of the kind:
TypeError: Observable_1.Observable.throw is not a function
TypeError: Observable_1.Observable.of is not a function

All that is imported at the top is:

import { Observable } from 'rxjs/Observable';

(The errors are in .spec files, btw)

...Back to 6.2.2

@maroy1986
Copy link

maroy1986 commented Sep 4, 2018

@jtsom Your import is wrong, should be :
import { Observable } from 'rxjs';

If ever the linter whines that you have an illegal import, you need to remove this from your tslint as this is the new way to go.

@jtsom
Copy link

jtsom commented Sep 4, 2018

But isn't the fact that we're using rxjs-compat mean that we don't have to change our imports (as in the sample in the original issue description)? I shouldn't have to change all the imports until we migrate and don't need rxjs-compat (?)

@maroy1986
Copy link

@jtsom Right, I skipped the part where you said you were still using rxjs-compat, sorry. In that case, I agree with you that there's something wrong.

But still, you might want to consider the full migration although I can understand this is a pain if your app has grown a lot.

@jtsom
Copy link

jtsom commented Sep 4, 2018

Agreed. Full migration would be the answer... but since we're just making the upgrade to latest Angular v6 and getting everything working (including fixing unit tests that are breaking after the update), adding that just yet isn't in the cards.

@deneboulton
Copy link

I too have encountered this issue using 6.3.2 where all patch imports were seemingly doing nothing; for me this specifically surfaced as errors for .of and .filter due them being used at app startup.

After installing 6.2.2, due to reading this issue, these errors no longer occur.

@JorgeJoseAbad
Copy link

Same or similar error doing ng serve.. but with Angular 6 (updated from 5), in console:

(etc)../node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Observable.js:27
sink._addParentTeardownLogic(this.source || (config_1.config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
^

TypeError: sink._addParentTeardownLogic is not a function

(resumed for clarity...)

at Observable.subscribe...
at MergeMapOperator.call..
at Object.subscribeToResult..

(and and more lines, all seem related to rxjs package, this rxjs was updated to 6.3.1, and the error arised, then downgraded to 6.2.2 and rxjs-compat also to 6.2.2 but the error remain.

node_modules deleted ad re-installed from package.json:
"dependencies": {
"@angular/animations": "^6.1.6",
"@angular/common": "^6.1.6",
"@angular/compiler": "^6.1.6",
"@angular/core": "^6.1.6",
"@angular/forms": "^6.1.6",
"@angular/http": "^6.1.6",
"@angular/platform-browser": "^6.1.6",
"@angular/platform-browser-dynamic": "^6.1.6",
"@angular/router": "^6.1.6",
"@ng-bootstrap/ng-bootstrap": "^3.2.0",
"bootstrap": "^4.1.3",
"chart.js": "^2.7.2",
"core-js": "^2.4.1",
"jquery": "^3.3.1",
"ng2-charts": "^1.6.0",
"popper.js": "^1.14.4",
"rxjs": "^6.2.2",
"rxjs-compat": "^6.2.2"
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.7.0-rc.3",
"@angular/cli": "6.1.5",
"@angular/compiler-cli": "^6.1.6",
"@angular/language-service": "^6.1.6",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "^2.0.4",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.0",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.9.2"
}

;-(

@whyvrafvr
Copy link

Hi folks.
Same issue with rxjs 6.3.2 and rxjs-compat 6.3.2 even after having removed node_modules or cleaned the npm's cache...
Updating angular, uninstalling rxjs/rxjs-compat 6.3.2 and re-installing rxjs/rxjs-compat 6.2.2 solves the problem... definitely on rxjs side.

@JorgeJoseAbad
Copy link

Hi skonx
not for
sink._addParentTeardownLogic
I've tried
"rxjs": "^6.2.2",
"rxjs-compat": "^6.2.2"
without success..

@whyvrafvr
Copy link

whyvrafvr commented Sep 6, 2018

Hi @JorgeJoseAbad.
Did you remove rxjs 6.3.2 and rxjs 6.3.2 and replaced them with the 6.2.2 version?
How did you do that?

@JorgeJoseAbad
Copy link

JorgeJoseAbad commented Sep 6, 2018

Yes. maybe not literally but I've tried:
npm install --save rxjs/rxjs-compat@6.2.2 --force
npm cache clean --force
delete node_module and npm install....

I have tried several things, also reinstalling 6.3.2..maybe I have not done something completely correctly, I am a beginner

@whyvrafvr
Copy link

whyvrafvr commented Sep 6, 2018

This is what I did:

  • ng update

  • ng update @angular/core -> reiterate with the different modules that the previous command shows

  • npm update --save (in order to update the modules which are not managed through ng update)

  • npm list rxjs (in order to see the rxjs dependencies, you should have rxjs 6.3.2 on all core modules and this is what we expect to change)

  • npm un --save rxjs

  • npm un --save rxjs-compat

  • npm list --depth=0 (in order to check that rxjs is removed, you should have a warning or an error at the end of the list)

  • npm i --save rxjs@6.2.2

  • npm i --save rxjs-compat@6.2.2

  • npm list rxjs (check that the previous dependencies have been changed with 6.2.2)

That's all for me.
Of course, if you perform a

rm -rf node_modules

and then a

npm i --unsafe-perm

==> you will reinstall rxjs 6.3.2 due to the angular current dependencies...

@whyvrafvr
Copy link

whyvrafvr commented Sep 6, 2018

... and I've read on a different thread that they "should talk about the issue during the next meeting" instead of changing the dependencies right now.
Anyway, when the issue will be fixed ng update will update it as cooler as it is :)

@pertrai1
Copy link
Contributor

pertrai1 commented Sep 6, 2018

Has anyone been able to fix this and can share what the exact version of angular is being used as well as the version of rxjs?

@arlowhite
Copy link

@angular-devkit/build-angular@0.8.1 did not fix the issue for me. Also tried 0.8.3
The package.json "resolutions": { "**/rxjs": "6.3.2" } trick did not seem to change the resolved rxjs transitive versions in package-lock.json Many sub-dependencies still use "rxjs": "~6.2.0"

So downgrading to rxjs@6.2.2 is the only solution that works for me.

Sidenote:
ng update @angular/core does bump RxJS to 6.3.2
So IMO this issue is fairly important to fix

@stefan-schweiger
Copy link

stefan-schweiger commented Sep 27, 2018

I had to force everything to version 6.2.2 and now it works with the current angular version.

"dependencies" : {
  ...
  "rxjs" : "6.2.2",
  "rxjs-compat": "6.2.2",
  ...
},
"resolutions": { "**/rxjs": "6.2.2" }

But the issue still isn't resolved with version 6.3.3

joshuawilson pushed a commit to fabric8-ui/fabric8-ui that referenced this issue Sep 27, 2018
joshuawilson pushed a commit to fabric8-ui/fabric8-ui that referenced this issue Sep 27, 2018
@msegers
Copy link

msegers commented Sep 28, 2018

We are also stuck on 6.2.2 for now, higher versions will cause the error stated above.
We are however still on devkit 0.6.x since higher versions of that lib cause our build to run out of memory :-)

@Ristaaf
Copy link

Ristaaf commented Oct 3, 2018

@benlesh: Minimal reproduction:

with angular cli 6.2.4

  1. ng new reproduction
  2. cd reproduction
  3. edit package.json to add rxjs: "6.3.3" and rxjs-compat "6.3.3"
  4. npm install
  5. edit main.ts to add:
import { Observable } from "rxjs/Observable";
import "rxjs/add/observable/of";

Observable.of(null);
  1. ng serve
  2. localhost:4200 check devtools console
Uncaught TypeError: rxjs_Observable__WEBPACK_IMPORTED_MODULE_4__.Observable.of is not a function

@Ristaaf
Copy link

Ristaaf commented Oct 9, 2018

@benlesh
And the reason has to do with this change:3f75564

rxjs-compat 6.2.2

Observable.js

export { Observable } from 'rxjs';

add/observable/of.js

import { Observable, of as staticOf } from 'rxjs';
Observable.of = staticOf;

rxjs-compat 6.3.3

Observable.js

export { Observable } from 'rxjs/internal/Observable';

add/observable/of.js

import { Observable, of as staticOf } from 'rxjs';
Observable.of = staticOf;

add/observable.of.js is the same as in 6.2.2. So there is a mismatch in 6.3.3 the of is not applied to the Observable imported in typscript with import {Observable} from "rxjs/Observable";

I do not know enough about this solution to know why this is, since the observable exported from Observable.js is also the "internal" one...

@Ristaaf
Copy link

Ristaaf commented Oct 9, 2018

Also tried this with angular 7 rc, the reason being that I then got a clean use of rxjs versions, all dependencies are using 6.3.3. But the problem is still there.

And also, by modifying node_modules/rxjs-compat/_esm5/Observable.js so that it imports from 'rxjs' everything works fine, however that reverts the mentioned commit which if I understand correctly fixes a problem with to much getting imported and packaged when tree shaking.

@Ristaaf
Copy link

Ristaaf commented Oct 9, 2018

And finally, this is as far as I can get I think, the following code (in typescript compiled with angular cli):

import { Observable } from 'rxjs/Observable';
import { Observable as Observable2 } from 'rxjs';
import { Observable as Observable3 } from 'rxjs/internal/Observable';
console.log(Observable === Observable2);
console.log(Observable === Observable3);
console.log(Observable3 === Observable2);

Will output true, false, false in rxjs 6.2 but false, true, false in rxjs 6.3

This indicates that normally (in 6.2 and before) when importing or adding to an Observable you are not getting the internal/Observable but something else. But after 6.3 importing from rxjs/Observable suddenly gets you the internal/Observable which is not the one that is added to (with of for example)

And these different imports will actually resolve to different files in 6.3 if looking at the build vendor.js file. so the import from rxjs/Observable will finally resolve to:
"node_modules/rxjs/internal/Observable.js"
but the import from rxjs will resolve to
"node_modules/rxjs/_esm5/internal/Observable.js"

In 6.2 they will both refer to the _esm5 internal Observable.

So that is my limit, I have no idea how/why webpack/typescript/angular-cli decides to use the _esm5 folder or even what it is, so someone take it from there.

And by the way, this issue might seem small right now, but once Angular 7 is out and everyone starts to use rxjs 6.3 this will become a big problem because there are still a lot of third party dependencies that rely on rxjs-compat and they will not work in that configuration (the three I know of that we use right now is kendo, microsoft bot framework and even the rxjs patch on zone.js)

@s25g5d4
Copy link

s25g5d4 commented Oct 11, 2018

import Observable from rxjs instead of rxjs/Observable. Also for static methods like of, zip, import static function from rxjs with the method name. It's more like rxjs-6 way.

import { Observable } from 'rxjs';
import { zip } from 'rxjs';
import { zip as observableZip } from 'rxjs';
import { Observable } from 'rxjs/Observable';

Analysis of Cause

Angular-cli uses a resolve alias for module rxjs/Observable internally while building, mapping it to rxjs-compat/_esm5/Observable. This mapping is provided by rxjs itself. see Build and Treeshaking for more information. Find angular-cli including the path-mapping here.

Prior to v6.3.0, rxjs-compact/_esm5/Observable exports Observable from rxjs, and when webpack resolves rxjs, it takes the value of key module in rxjs' package.json as entry point. See resolve.mainFields for more information. For v6.2.2 the module value is rxjs/_esm5/index.js, so the exported Observable object is from rxjs/_esm5/index.js. But, released in v6.3.0, commit 3f75564 changed the import path of Observable from rxjs to rxjs/internal/Observable, causing webpack not to honor the module value in package.json anymore and directly import Observable from rxjs/internal/Observable. The correct resolved path should be rxjs/_esm5/internal/Observable.

Possible solutions for rxjs project itself, would be to add rxjs/internal/Observable to its path-mapping file, mapping it to rxjs/_esm5/internal/Observable, or revert 3f75564 . For users please consider migrate your pre-rxjs6 code to latest. For angular users, if you insist, I have a workaround for you. Add the following snippet to your src/tsconfig.app.json:

{
    "compilerOptions": {
        "paths": {
            "rxjs/internal/Observable": [
                "../node_modules/rxjs/_esm5/internal/Observable"
            ]
        }
    }
}

Please remove this workaround after you finish rxjs 6 migration on your project. It may not work for future versions.

@s25g5d4
Copy link

s25g5d4 commented Oct 12, 2018

Please find sample code here: https://github.com/s25g5d4/rxjs-path-mapping-issue

@Ristaaf
Copy link

Ristaaf commented Oct 15, 2018

@s25g5d4 Great information, thanks!

As for the first solution/workaround it actually means migrating halfway to rxjs 6, this problem is mainly about code that needs to work both with rxjs 5 and 6, typically in existing libraries you use, Kendo as an example has clearly stated that as long as they support rxjs 5 (which will be at least for another year), they will use the rxjs 5 syntax and require you to use rxjs-compat if using rxjs 6.

The workaround for Angular CLI is great (even if of course we would like to avoid workarounds as much as possible), did not know it was possible to solve that way thanks for the information and education on the matter!

joshuawilson added a commit to openshiftio/saas-openshiftio that referenced this issue Oct 18, 2018
* f65e037c2 style(lint): add airbnb rule overrides
* 915a75bc4 feat(angular): add angular support to scripts
* ac48d5b9f fix(header): fix capitalization of 'Create Space' in the user dropdown (#3377)
* 595e82fd4 Deployments utilization bar component can display "other spaces" utilization (#3343)
* feff1cc17 feat(scripts): add script to launch production server using http-server
* f26f5a98e fix(header): remove duplicate of spaces (#3374)
* d2b9d254a chore(lint): fix lint errors
* ec70ecd0c feat(lint): add htmlhint and angular language service support
* 4dc8160dc fix(space-dashboard): fix work-item filter query in create work-item widget (#3365)
* e93608dbf fix(codebases): fix switch component change state trigger after upgrade (#3368)
* 35ec3b9ff fix(version): Planner version upgraded to 0.56.0 (#3373)
* 5983eb0ad feat(widgets): initial setup for react widgets package
* d674abd15 fix(scripts): expose webpack configs for reuse
* 964a8b91a style(style-lint): add .md files to ignore list
* 52b949e86 style(style-lint): allow hex colors
* 3428124f5 fix(less): fix pfng list header text spacing (#3369)
* 14e010c6f feat(header): add 'Create Issue' help menu item to open GitHub issues (#3367)
* fd4f24c65 fix(stack-report-btn): fixes stack report button not appearing in pipelines view wrt recent change in stage name (#3366)
* 1d8b9c80b fix(header): fix header navbar colouring to be dark (#3364)
* b1310ad02 fix(test): skip intermittent failing test
* 04c4bd681 fix(scripts): rewire react-scripts instead of managing our own copy
* 34cde6442 fix(lint): remove promise lint rule which conflicts with typescript no unused local vars warning
* 09cf75eaf fix(lint): add common eslintrc for packages
* ad5bc32c4 feat(monorepo): initial monorepo setup (#3357)
* dc27273f7 fix(home): bring back feature flagged old dashboard (#3362)
* 6968bc976 fix(home): remove onboarding area from home page (#3361)
* a8c20a484 fix(codebases): change font weight for codebase title (#3360)
* 06bd8fbf1 fix(header): move chat with us to help section (#3359)
* 2099b3c9b clean(test): remove unused and document running unit test (#3358)
* cd786a085 fix(ngx-login-client): upgrade ngx-login-client and provide value for WIT_API_PROXY (#3354)
* 1750c3598 fix(tree-view): Fix missing expand toggle in area components (#3356)
* c73b0481b fix(tenant): modify _tenant page to reflect changes coming in fabric8-services/fabric8-tenant#634 (#3344)
* 67a5c9aba fix(package): update launcher to 2.0.8 (#3355)
* a82d70152 fix(build): switch to 'eval-source-map' for dev as it is faster on reload then 'source-map' (#3353)
* 67048fbff fix(webpack): remove sourcemap file mappings to improve locating sources in dev web inspector (#3352)
* 36787821d feat(package): update recommender to 1.0.2 (#3351)
* b02926956 fix(deployments): cache pod quota requirements (#3350)
* 57be60aa4 fix(css): omit css sourceMap in prod and extract css to separate file (#3348)
* b03be5771 fix(build): set up the build to release now that the version of semantic-release has been updated
* 7b0a564ea style(deployments): code cleanup (#3329)
* 23dc8dd47 style(settings): code cleanup (#3330)
* f3ca84ad8 feat(deployments): allow scaling only if remaining quota is sufficient (#3336)
* b22f17333 cleanup(imports): remove unused imports (#3345)
* 2087e185a refactor(overview-component): general code cleanup (#3328)
* 7f70afa85 feat(settings): show openshift cluster url in connected account section (#3332)
* 89d11a4cd cleanup(email-verification): remove unused component for email verification (#3337)
* fe17a17f4 fix(jest): add --runInBand for jest:debug (#3346)
* e45d1ce22 fix(angular): set preserveWhitespaces to true for compatibility
* 27776b77d fix(build): update build to run test script
* 093cb7870 fix(script): move the script to call jest for tests
* 35fe854e4 fix(test): skip 2 tests that fail randomly
* 8ab4eb415 fix(rxjs): add missing pipe
* 1e5b74d31 fix(rxjs): more upgrade to rxjs updates
* e573c5f36 fix(context): remove dup line from merge
* 22d9fa648 support Jest (#3342)
* b3b1b4065 fix(build): clean up tsconfig
* 9217e4b95 fix(test): skip 40 tests to get the webpack test to build
* 0a519b17a fix(test): turn on tsconfig sourcemaps to work with istanbul-instrumenter-loader
* 4be6a8bfe fix(imports): clean up imports
* 8886f6982 fix(test): comment out the .html raw-loader as it was causing the tests to not run
* c5a0d70c1 fix(test): turn off lint to save time, update changes in webpack
* cf33cbece fix(build): update webpack config to allign with latest webpack
* 456d04d2e fix(test): due to a change in angular 6, we need to set preserveWhitespaces to true
* e7b1b236d fix(test): remove whitespace that broke tests on a src ref
* 2267f07fd fix(test): add reference to test support files in webpack config
* d4e7595b3 fix(test): comment out sourcemaps to get past 'FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory'
* 195b71199 feat(package): upgarde Typescript to 3.0.3
* 08447e873 fix(test): uncomment the entry points in the test webpack config
* 30deb6750 clean(test): remove unusued func tests, moved to https://github.com/fabric8io/fabric8-test/ (#3335)
* 3a7cf4e60 fix(test-build): turn off sourcemaps in tsconfig and remove entry in webpack config to get the tests to run
* 3b28f5947 fix(build): clean up webpack configs, trying to get the tests to work
* 501947405 fix(package): downgrade TypeScript to 2.9.2 to work with Angular
* 0b6290e8d fix(package): downgrade rxjs to 5.2.2 to work with components not upgraded yet
* ddb168a10 fix(build): remove MiniCssExtractPlugin ref in build
* 5ec7a03e5 fix(rxjs-compat): downgrade to 6.2.2 ReactiveX/rxjs#4070 (#3333)
* 68c5f7c77 fix(perf): update the npm scripts to call perf correctly
* c80fd5e7c feat(build): set perf build to rely on prod
* 2e0c6efa2 fix(webpack): add ManifestPlugin
* e50752cd1 fix(webpack): fix errors with uglify in prod webpack config
* 1f5c1e78a fix(package): update the package-lock
* 0c0f27b4c feat(package): upgrade webpack to 4.19.1
* b99d79ad4 feat(package): upgrade ts-loader to 5.1.1
* a8622925a feat(package): upgrade semantic-release to 15.9.16
* 82bf44f09 feat(package): upgrade patternfly to 3.54.8
* 51482f0bd feat(package): upgrade gh-pages to 2.0.0
* 650536000 feat(package): upgrade @types/webpack to 4.4.12
* 7d78d663e feat(package): upgrade @types/node to 10.10.1
* d5a3d4038 feat(package): upgrade @ngtools/webpack 6.2.3
* 748a68069 feat(package): upgrade @angular to 6.1.8
* 685e051ea feat(package): update ngx-fabric8-wit to 8.1.1
* e3e81bd6f feat(rxjs): import rxjs-compat globally
* 02bccc047 fix(build): remove ref to non-existant type 'source-map' in the 'types' section
* 29b6fecc4 fix(version): downgrade ngrx (5.2.0) back to compatible version for planner
* 7b8567d77 fix(oauth): import oauth module instead of service
* f6428a17d fix(http): remove unused http import and injection
* b947ffdcd feat(build): change webpack to not use extractCSS and prep for using MiniCssExtractPlugin
* c77b046fe feat(auth): add the auth interceptor
* d5cb990c7 fix(version): upversion ngx-fabric8-wit and use new API
* ed2c34f3a fix(webpack): fix errors with loading css due to extract text plugin (#3326)
* 427f910da fix(package): put back @types/source-map 0.5.7 to fix a source-map issue with rxjs
* 4c8d96ff5 fix(webpack): change webpack chunking and optimizations so that  main bundle is included in html template
* 225569c8b fix(package): downgrade angular-tree-component to ^7.0.0 to match patternfly
* 433e9d567 fix(webpack): source-map-loader warnings on rxjs compat (#3325)
* ff7eaab27 fix(auth): clean up import of angular-oauth2-oidc
* 5aaadeabe fix(package): downgrade bootstrap to work with patternfly
* 149ef2413 fix(rxjs): upgrade use of observableNever in space service spec
* e96f4b457 fix(profile): remove test of error that doesn't catch error (and doesn't compile)
* 1add86e7e fix(auth): update lib ref for angular-oauth2-oidc
* 8e86721df feat(build): update the test configs in trying to get the unit tests to run
* a49b141b5 feat(package): upgrade Typescript to 3.0.3 to get the ts-loader to work, this might break angular
* d1fec3210 fix(lint): fix lint errors with imports
* 5afd4a93e fix(build:dev): remove awesone-typescript plugin and unsued UgliflyPlugin for dev build
* 02c85241a fix(rxjs): Upgrade Scheduler import, fix Type information
* 9a46d82dd clean(formatting): tslint for import statement
* e8b465479 fix(TS2339): TS error on connect needed cast as ConnetableObservable
* 36466cfca fix(rxjs): change the ref to observable 'empty' so that it could be called
* 536c98476 fixup fix(treelist): point the treelist to patternfly-sandbox-ng so we can keep using it for now
* eca819044 feat(package): add patternfly-sandbox-ng
* 3d80d9b17 feat(lint): fix lint errors and upgrade rxjs syntax
* c5c8f5772 feat(http): remove old fabric8-ui-http.service
* b3d637958 feat(package): update libs
* f8bd623ac feat(http): remove refrence to login-client HttpService
* 5ed3bb4fc feat(build): remove gendir, instead look at using skipTemplateCodeGen
* 5aa429ac3 feat(http): update app.module to use ng6 httpClient
* 57482af47 feat(injectionToken): replace OpaqueToken with InjectionToken
* 3a6860968 feat(build): remove old webpack plugins and replace with 'optimization' config
* 257f8ba1a feat(build): add wepback mode to configs
* a67fbeae1 feat(package): update lock file
* 335dc2a76 feat(package): update webpack to 4.18.0
* 1a96289a3 feat(package): update angular-oauth2-oidc to 4.0.3
* 1bfafa700 feat(package): update lib versions
* 4029406ba fix(package): update package-lock
* 2dcd37002 feat(build): update test build/configs for webpack 4
* 07f937ddc fix(build): alphebetize the tsconfigs
* a0cbe4942 feat(lint): add RxJS lint rules
* 6adceca5d feat(package): set yargs to 12.0.1
* 63226e529 feat(package): remove angular2-tree-component@3.1.0. The new version is angular-tree-component.
* 41ee895af feat(package): remove angular2-oauth2@1.3.10. The new version of this lib is called angular-oauth2-oidc.
* 1b4fa7703 fix(package): @types/source-map@0.5.7 is a stub types definition for source-map and isn't needed
* 7a1592683 feat(package): update @angular to 6.1.6
* 07c34d54c fix(license): add a file ext to the LICENSE
* 81cd83a6a (tag: v1.121.0, matousjobanek/master) feat(recent): introduce recent-utils to be extended by context and spaces service for "recent" logic (#3341)
joshuawilson added a commit to openshiftio/saas-openshiftio that referenced this issue Oct 18, 2018
* f65e037c2 style(lint): add airbnb rule overrides
* 915a75bc4 feat(angular): add angular support to scripts
* ac48d5b9f fix(header): fix capitalization of 'Create Space' in the user dropdown (#3377)
* 595e82fd4 Deployments utilization bar component can display "other spaces" utilization (#3343)
* feff1cc17 feat(scripts): add script to launch production server using http-server
* f26f5a98e fix(header): remove duplicate of spaces (#3374)
* d2b9d254a chore(lint): fix lint errors
* ec70ecd0c feat(lint): add htmlhint and angular language service support
* 4dc8160dc fix(space-dashboard): fix work-item filter query in create work-item widget (#3365)
* e93608dbf fix(codebases): fix switch component change state trigger after upgrade (#3368)
* 35ec3b9ff fix(version): Planner version upgraded to 0.56.0 (#3373)
* 5983eb0ad feat(widgets): initial setup for react widgets package
* d674abd15 fix(scripts): expose webpack configs for reuse
* 964a8b91a style(style-lint): add .md files to ignore list
* 52b949e86 style(style-lint): allow hex colors
* 3428124f5 fix(less): fix pfng list header text spacing (#3369)
* 14e010c6f feat(header): add 'Create Issue' help menu item to open GitHub issues (#3367)
* fd4f24c65 fix(stack-report-btn): fixes stack report button not appearing in pipelines view wrt recent change in stage name (#3366)
* 1d8b9c80b fix(header): fix header navbar colouring to be dark (#3364)
* b1310ad02 fix(test): skip intermittent failing test
* 04c4bd681 fix(scripts): rewire react-scripts instead of managing our own copy
* 34cde6442 fix(lint): remove promise lint rule which conflicts with typescript no unused local vars warning
* 09cf75eaf fix(lint): add common eslintrc for packages
* ad5bc32c4 feat(monorepo): initial monorepo setup (#3357)
* dc27273f7 fix(home): bring back feature flagged old dashboard (#3362)
* 6968bc976 fix(home): remove onboarding area from home page (#3361)
* a8c20a484 fix(codebases): change font weight for codebase title (#3360)
* 06bd8fbf1 fix(header): move chat with us to help section (#3359)
* 2099b3c9b clean(test): remove unused and document running unit test (#3358)
* cd786a085 fix(ngx-login-client): upgrade ngx-login-client and provide value for WIT_API_PROXY (#3354)
* 1750c3598 fix(tree-view): Fix missing expand toggle in area components (#3356)
* c73b0481b fix(tenant): modify _tenant page to reflect changes coming in fabric8-services/fabric8-tenant#634 (#3344)
* 67a5c9aba fix(package): update launcher to 2.0.8 (#3355)
* a82d70152 fix(build): switch to 'eval-source-map' for dev as it is faster on reload then 'source-map' (#3353)
* 67048fbff fix(webpack): remove sourcemap file mappings to improve locating sources in dev web inspector (#3352)
* 36787821d feat(package): update recommender to 1.0.2 (#3351)
* b02926956 fix(deployments): cache pod quota requirements (#3350)
* 57be60aa4 fix(css): omit css sourceMap in prod and extract css to separate file (#3348)
* b03be5771 fix(build): set up the build to release now that the version of semantic-release has been updated
* 7b0a564ea style(deployments): code cleanup (#3329)
* 23dc8dd47 style(settings): code cleanup (#3330)
* f3ca84ad8 feat(deployments): allow scaling only if remaining quota is sufficient (#3336)
* b22f17333 cleanup(imports): remove unused imports (#3345)
* 2087e185a refactor(overview-component): general code cleanup (#3328)
* 7f70afa85 feat(settings): show openshift cluster url in connected account section (#3332)
* 89d11a4cd cleanup(email-verification): remove unused component for email verification (#3337)
* fe17a17f4 fix(jest): add --runInBand for jest:debug (#3346)
* e45d1ce22 fix(angular): set preserveWhitespaces to true for compatibility
* 27776b77d fix(build): update build to run test script
* 093cb7870 fix(script): move the script to call jest for tests
* 35fe854e4 fix(test): skip 2 tests that fail randomly
* 8ab4eb415 fix(rxjs): add missing pipe
* 1e5b74d31 fix(rxjs): more upgrade to rxjs updates
* e573c5f36 fix(context): remove dup line from merge
* 22d9fa648 support Jest (#3342)
* b3b1b4065 fix(build): clean up tsconfig
* 9217e4b95 fix(test): skip 40 tests to get the webpack test to build
* 0a519b17a fix(test): turn on tsconfig sourcemaps to work with istanbul-instrumenter-loader
* 4be6a8bfe fix(imports): clean up imports
* 8886f6982 fix(test): comment out the .html raw-loader as it was causing the tests to not run
* c5a0d70c1 fix(test): turn off lint to save time, update changes in webpack
* cf33cbece fix(build): update webpack config to allign with latest webpack
* 456d04d2e fix(test): due to a change in angular 6, we need to set preserveWhitespaces to true
* e7b1b236d fix(test): remove whitespace that broke tests on a src ref
* 2267f07fd fix(test): add reference to test support files in webpack config
* d4e7595b3 fix(test): comment out sourcemaps to get past 'FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory'
* 195b71199 feat(package): upgarde Typescript to 3.0.3
* 08447e873 fix(test): uncomment the entry points in the test webpack config
* 30deb6750 clean(test): remove unusued func tests, moved to https://github.com/fabric8io/fabric8-test/ (#3335)
* 3a7cf4e60 fix(test-build): turn off sourcemaps in tsconfig and remove entry in webpack config to get the tests to run
* 3b28f5947 fix(build): clean up webpack configs, trying to get the tests to work
* 501947405 fix(package): downgrade TypeScript to 2.9.2 to work with Angular
* 0b6290e8d fix(package): downgrade rxjs to 5.2.2 to work with components not upgraded yet
* ddb168a10 fix(build): remove MiniCssExtractPlugin ref in build
* 5ec7a03e5 fix(rxjs-compat): downgrade to 6.2.2 ReactiveX/rxjs#4070 (#3333)
* 68c5f7c77 fix(perf): update the npm scripts to call perf correctly
* c80fd5e7c feat(build): set perf build to rely on prod
* 2e0c6efa2 fix(webpack): add ManifestPlugin
* e50752cd1 fix(webpack): fix errors with uglify in prod webpack config
* 1f5c1e78a fix(package): update the package-lock
* 0c0f27b4c feat(package): upgrade webpack to 4.19.1
* b99d79ad4 feat(package): upgrade ts-loader to 5.1.1
* a8622925a feat(package): upgrade semantic-release to 15.9.16
* 82bf44f09 feat(package): upgrade patternfly to 3.54.8
* 51482f0bd feat(package): upgrade gh-pages to 2.0.0
* 650536000 feat(package): upgrade @types/webpack to 4.4.12
* 7d78d663e feat(package): upgrade @types/node to 10.10.1
* d5a3d4038 feat(package): upgrade @ngtools/webpack 6.2.3
* 748a68069 feat(package): upgrade @angular to 6.1.8
* 685e051ea feat(package): update ngx-fabric8-wit to 8.1.1
* e3e81bd6f feat(rxjs): import rxjs-compat globally
* 02bccc047 fix(build): remove ref to non-existant type 'source-map' in the 'types' section
* 29b6fecc4 fix(version): downgrade ngrx (5.2.0) back to compatible version for planner
* 7b8567d77 fix(oauth): import oauth module instead of service
* f6428a17d fix(http): remove unused http import and injection
* b947ffdcd feat(build): change webpack to not use extractCSS and prep for using MiniCssExtractPlugin
* c77b046fe feat(auth): add the auth interceptor
* d5cb990c7 fix(version): upversion ngx-fabric8-wit and use new API
* ed2c34f3a fix(webpack): fix errors with loading css due to extract text plugin (#3326)
* 427f910da fix(package): put back @types/source-map 0.5.7 to fix a source-map issue with rxjs
* 4c8d96ff5 fix(webpack): change webpack chunking and optimizations so that  main bundle is included in html template
* 225569c8b fix(package): downgrade angular-tree-component to ^7.0.0 to match patternfly
* 433e9d567 fix(webpack): source-map-loader warnings on rxjs compat (#3325)
* ff7eaab27 fix(auth): clean up import of angular-oauth2-oidc
* 5aaadeabe fix(package): downgrade bootstrap to work with patternfly
* 149ef2413 fix(rxjs): upgrade use of observableNever in space service spec
* e96f4b457 fix(profile): remove test of error that doesn't catch error (and doesn't compile)
* 1add86e7e fix(auth): update lib ref for angular-oauth2-oidc
* 8e86721df feat(build): update the test configs in trying to get the unit tests to run
* a49b141b5 feat(package): upgrade Typescript to 3.0.3 to get the ts-loader to work, this might break angular
* d1fec3210 fix(lint): fix lint errors with imports
* 5afd4a93e fix(build:dev): remove awesone-typescript plugin and unsued UgliflyPlugin for dev build
* 02c85241a fix(rxjs): Upgrade Scheduler import, fix Type information
* 9a46d82dd clean(formatting): tslint for import statement
* e8b465479 fix(TS2339): TS error on connect needed cast as ConnetableObservable
* 36466cfca fix(rxjs): change the ref to observable 'empty' so that it could be called
* 536c98476 fixup fix(treelist): point the treelist to patternfly-sandbox-ng so we can keep using it for now
* eca819044 feat(package): add patternfly-sandbox-ng
* 3d80d9b17 feat(lint): fix lint errors and upgrade rxjs syntax
* c5c8f5772 feat(http): remove old fabric8-ui-http.service
* b3d637958 feat(package): update libs
* f8bd623ac feat(http): remove refrence to login-client HttpService
* 5ed3bb4fc feat(build): remove gendir, instead look at using skipTemplateCodeGen
* 5aa429ac3 feat(http): update app.module to use ng6 httpClient
* 57482af47 feat(injectionToken): replace OpaqueToken with InjectionToken
* 3a6860968 feat(build): remove old webpack plugins and replace with 'optimization' config
* 257f8ba1a feat(build): add wepback mode to configs
* a67fbeae1 feat(package): update lock file
* 335dc2a76 feat(package): update webpack to 4.18.0
* 1a96289a3 feat(package): update angular-oauth2-oidc to 4.0.3
* 1bfafa700 feat(package): update lib versions
* 4029406ba fix(package): update package-lock
* 2dcd37002 feat(build): update test build/configs for webpack 4
* 07f937ddc fix(build): alphebetize the tsconfigs
* a0cbe4942 feat(lint): add RxJS lint rules
* 6adceca5d feat(package): set yargs to 12.0.1
* 63226e529 feat(package): remove angular2-tree-component@3.1.0. The new version is angular-tree-component.
* 41ee895af feat(package): remove angular2-oauth2@1.3.10. The new version of this lib is called angular-oauth2-oidc.
* 1b4fa7703 fix(package): @types/source-map@0.5.7 is a stub types definition for source-map and isn't needed
* 7a1592683 feat(package): update @angular to 6.1.6
* 07c34d54c fix(license): add a file ext to the LICENSE
* 81cd83a6a (tag: v1.121.0, matousjobanek/master) feat(recent): introduce recent-utils to be extended by context and spaces service for "recent" logic (#3341)
@rajkumarm-iprogrammer
Copy link

Force or reinstall exact version of rxjs@6.2.2 and rxjs-compat@6.2.2.

This one is worked for me as well.
Thanks 👍 :

@KevinKelchen
Copy link

I updated to Ionic 4 Beta 17 (Angular 7) which resulted in going from RxJS 6.2.2 to 6.3.3. Editing the tsconfig.app.json file with the paths workaround was to no avail for me.

Instead, I am sticking with RxJS 6.3.3 but am leaving rxjs-compat at 6.2.2. Due to this issue, I will probably need to just bite the bullet and do the full upgrade to RxJS 6 before we release our app.

@ashraf-cslsoft
Copy link

ashraf-cslsoft commented Jan 15, 2019

Instead of
import 'rxjs/add/observable/of';

Below works for me
import { of } from 'rxjs';

@monelseZA
Copy link

Import : import { of as observableOf} from 'rxjs';

and Change Observable.of to observableOf

cartant added a commit to cartant/rxjs that referenced this issue Jan 27, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 1, 2019
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