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

Problem with latest RxJS version in generation command-line process #10351

Closed
akanass opened this issue Apr 16, 2018 · 4 comments
Closed

Problem with latest RxJS version in generation command-line process #10351

akanass opened this issue Apr 16, 2018 · 4 comments

Comments

@akanass
Copy link

akanass commented Apr 16, 2018

Versions

Angular CLI: 6.0.0-rc.4
Node: 9.11.1
OS: darwin x64
Angular: 6.0.0-rc.5
... animations, common, compiler, compiler-cli, core, elements
... forms, http, language-service, platform-browser
... platform-browser-dynamic, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.5.6
@angular-devkit/build-angular      0.5.6
@angular-devkit/build-ng-packagr   0.5.6
@angular-devkit/build-optimizer    0.5.6
@angular-devkit/core               0.5.6
@angular-devkit/schematics         0.5.6
@angular/cli                       6.0.0-rc.4
@ngtools/json-schema               1.1.0
@ngtools/webpack                   6.0.0-rc.4
@schematics/angular                0.5.6
@schematics/update                 0.5.6
rxjs                               6.0.0-uncanny-rc.7
typescript                         2.7.2
webpack                            4.5.0

Repro steps

  • Install angular-cli
  • Create new project => ng new my-project
  • Generate a new library ng g library my-library or a service ng g s my-service

Observed behavior

For library generation :

CREATE projects/my-library/karma.conf.js (1012 bytes)
CREATE projects/my-library/ng-package.json (191 bytes)
CREATE projects/my-library/ng-package.prod.json (152 bytes)
CREATE projects/my-library/package.json (175 bytes)
CREATE projects/my-library/src/public_api.ts (191 bytes)
CREATE projects/my-library/src/test.ts (700 bytes)
CREATE projects/my-library/tsconfig.lint.json (201 bytes)
CREATE projects/my-library/tsconfig.spec.json (246 bytes)
CREATE projects/my-library/tslint.json (317 bytes)
CREATE projects/my-library/src/lib/my-library.module.ts (265 bytes)
CREATE projects/my-library/src/lib/my-library.component.spec.ts (685 bytes)
CREATE projects/my-library/src/lib/my-library.component.ts (282 bytes)
CREATE projects/my-library/src/lib/my-library.service.spec.ts (423 bytes)
CREATE projects/my-library/src/lib/my-library.service.ts (143 bytes)
UPDATE angular.json (9731 bytes)
UPDATE package.json (1622 bytes)
UPDATE tsconfig.json (727 bytes)
/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/util/subscribeTo.js:42
        throw new TypeError(msg);
        ^

TypeError: You provided 'function reduceOperatorFunction(source) {
        return pipe_1.pipe(scan_1.scan(function (acc, value, index) {
            return accumulator(acc, value, index + 1);
        }), takeLast_1.takeLast(1))(source);
    }' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
    at Object.exports.subscribeTo (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/util/subscribeTo.js:42:15)
    at Object.subscribeToResult (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/util/subscribeToResult.js:7:26)
    at MergeMapSubscriber._innerSub (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/operators/mergeMap.js:132:38)
    at MergeMapSubscriber._tryNext (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/operators/mergeMap.js:129:14)
    at MergeMapSubscriber._next (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/operators/mergeMap.js:112:18)
    at MergeMapSubscriber.notifyComplete (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/operators/mergeMap.js:148:18)
    at InnerSubscriber._complete (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/InnerSubscriber.js:37:21)
    at InnerSubscriber.Subscriber.complete (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/Subscriber.js:128:18)
    at Observable.rxjs_1.concat.rxjs_1.concat.rxjs_1.Observable.obs [as _subscribe] (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/@angular-devkit/schematics/tools/workflow/node-workflow.js:113:17)
    at Observable.subscribe (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/Observable.js:162:69)

For service :

CREATE src/app/my-service.service.spec.ts (362 bytes)
CREATE src/app/my-service.service.ts (133 bytes)
/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/util/hostReportError.js:9
    setTimeout(function () { throw err; });
                             ^

TypeError: You provided 'function reduceOperatorFunction(source) {
        return pipe_1.pipe(scan_1.scan(function (acc, value, index) {
            return accumulator(acc, value, index + 1);
        }), takeLast_1.takeLast(1))(source);
    }' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
    at Object.exports.subscribeTo (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/util/subscribeTo.js:42:15)
    at Object.subscribeToResult (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/util/subscribeToResult.js:7:26)
    at MergeMapSubscriber._innerSub (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/operators/mergeMap.js:132:38)
    at MergeMapSubscriber._tryNext (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/operators/mergeMap.js:129:14)
    at MergeMapSubscriber._next (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/operators/mergeMap.js:112:18)
    at MergeMapSubscriber.notifyComplete (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/operators/mergeMap.js:148:18)
    at InnerSubscriber._complete (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/InnerSubscriber.js:37:21)
    at InnerSubscriber.Subscriber.complete (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/Subscriber.js:128:18)
    at Observable.rxjs_1.concat.rxjs_1.concat.rxjs_1.Observable.obs [as _subscribe] (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/@angular-devkit/schematics/tools/workflow/node-workflow.js:113:17)
    at Observable.subscribe (/Users/akanass/Programmation/Angular/webcomponents-cli/node_modules/rxjs/internal/Observable.js:162:69)

All elements are created but cli throw errors.

Desired behavior

No errors provided by cli process

@cyrilletuzi
Copy link
Contributor

I confirm this issue. It happens in several other places (like ng add @angular/elements), so I think it's a RxJS issue with last RC.

@cyrilletuzi
Copy link
Contributor

ReactiveX/rxjs#3573 : last comment is suggesting the error is on CLI side, not RxJS.

@filipesilva
Copy link
Contributor

Heya, we are tracking this issue in #10335.

Closing as duplicate of #10335.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 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

3 participants