Angular-cli: Can't update @angular/cli from 1.7.x to @next

Created on 14 Apr 2018  路  7Comments  路  Source: angular/angular-cli

Versions

Angular CLI: 6.0.0-rc.4
Node: 9.11.1
OS: win32 x64
Angular: 5.2.7
... animations, common, compiler, compiler-cli, core, 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/core            0.5.6 (cli-only)
@angular-devkit/schematics      0.5.6 (cli-only)
@angular/cli                    6.0.0-rc.4
@ngtools/json-schema            1.2.0
@schematics/angular             0.5.6 (cli-only)
@schematics/update              0.5.6
rxjs                            5.5.6
typescript                      2.5.3

Repro steps

  • yarn add @angular/cli@next
  • ng update @angular/cli --migrate-only --from=1.7.0 <- throw exception

Observed behavior

C:\workspace\angular-ais>ng update @angular/cli --migrate-only --from=1.7.0
            Updating karma configuration
            Updating configuration
            Removing old config file (.angular-cli.json)
            Writing config file (angular.json)
npm WARN rm not removing C:\workspace\angular-ais\node_modules\.bin\semver.cmd as it wasn't installed by C:\workspace\angular-ais\node_modules\semver
npm WARN rm not removing C:\workspace\angular-ais\node_modules\.bin\semver as it wasn't installed by C:\workspace\angular-ais\node_modules\semver

> [email protected] install C:\workspace\angular-ais\node_modules\uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0


> [email protected] install C:\workspace\angular-ais\node_modules\node-sass
> node scripts/install.js

Cached binary found at C:\Users\PaiChun Chang\AppData\Roaming\npm-cache\node-sass\4.7.2\win32-x64-59_binding.node

> [email protected] postinstall C:\workspace\angular-ais\node_modules\node-sass
> node scripts/build.js

Binary found at C:\workspace\angular-ais\node_modules\node-sass\vendor\win32-x64-59\binding.node
Testing binary
Binary is fine

> @angular/[email protected] postinstall C:\workspace\angular-ais\node_modules\@angular\cli
> node ./bin/ng-update-message.js

npm WARN [email protected] requires a peer of webpack@^4.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@>=1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 688 packages, removed 49 packages and updated 611 packages in 50.876s
DELETE .angular-cli.json
CREATE angular.json (4029 bytes)
UPDATE karma.conf.js (1040 bytes)
UPDATE src/tsconfig.spec.json (302 bytes)
UPDATE package.json (1445 bytes)
UPDATE tslint.json (2997 bytes)
C:\workspace\angular-ais\node_modules\@angular-devkit\schematics\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 (C:\workspace\angular-ais\node_modules\@angular-devkit\schematics\node_modules\rxjs\internal\util\subscribeTo.js:42:15)
    at Object.subscribeToResult (C:\workspace\angular-ais\node_modules\@angular-devkit\schematics\node_modules\rxjs\internal\util\subscribeToResult.js:7:26)
    at MergeMapSubscriber._innerSub (C:\workspace\angular-ais\node_modules\@angular-devkit\schematics\node_modules\rxjs\internal\operators\mergeMap.js:132:38)
    at MergeMapSubscriber._tryNext (C:\workspace\angular-ais\node_modules\@angular-devkit\schematics\node_modules\rxjs\internal\operators\mergeMap.js:129:14)
    at MergeMapSubscriber._next (C:\workspace\angular-ais\node_modules\@angular-devkit\schematics\node_modules\rxjs\internal\operators\mergeMap.js:112:18)
    at MergeMapSubscriber.notifyComplete (C:\workspace\angular-ais\node_modules\@angular-devkit\schematics\node_modules\rxjs\internal\operators\mergeMap.js:148:18)
    at InnerSubscriber._complete (C:\workspace\angular-ais\node_modules\@angular-devkit\schematics\node_modules\rxjs\internal\InnerSubscriber.js:37:21)
    at InnerSubscriber.Subscriber.complete (C:\workspace\angular-ais\node_modules\@angular-devkit\schematics\node_modules\rxjs\internal\Subscriber.js:128:18)
    at Observable.rxjs_1.concat.rxjs_1.concat.rxjs_1.Observable.obs [as _subscribe] (C:\workspace\angular-ais\node_modules\@angular-devkit\schematics\tools\workflow\node-workflow.js:113:17)
    at Observable.subscribe (C:\workspace\angular-ais\node_modules\@angular-devkit\schematics\node_modules\rxjs\internal\Observable.js:162:69)

Desired behavior

Mention any other details that might be useful (optional)

2 (required)

Most helpful comment

same thing here from 1.7.4 to r.c.4

All 7 comments

same thing here from 1.7.4 to r.c.4

https://github.com/angular/angular-cli/issues/10336 seems to be the same as this one. It looks to be related or caused by [email protected], and happens on new projects as well.

This seems to be the issue on rxjs https://github.com/ReactiveX/rxjs/issues/3573.

Hi. I commented on the RxJS issue - https://github.com/ReactiveX/rxjs/issues/3573 - to point out that the issue's snippet contained an error. There is a similar error in this file and the result of a call to the reduce pipeable operator is passed to concat.

As a temporary workaround: npm install [email protected]

Hi @cartant, thank you for letting us know what the problem is!

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._

Was this page helpful?
0 / 5 - 0 ratings