Solvedangular cli Error: dryRunSink.commit(...).ignoreElements(...).concat is not a function

Just Upgraded to Angular CLI: 1.6.4

each time I run ng new I get this error

Error: dryRunSink.commit(...).ignoreElements(...).concat is not a function
dryRunSink.commit(...).ignoreElements(...).concat is not a function

55 Answers

✔️Accepted Answer

Following this worked -

npm install @angular-devkit/schematics@0.0.45 @angular/cli --no-save
$(npm bin)/ng new my-new-app

Other Answers:

they are dependencies which can be added to the package.json of your project, and no "":"0.0.42", "": "0.0.23" is not enough. you need the full dependency names:
"@angular-devkit/schematics":"0.0.42", "@angular-devkit/core": "0.0.23"

In my case, I had no project to add these dependencies to (creating a new one now), so I had to follow @eclanrs's solution at angular/devkit#380:

npm i @angular-devkit/schematics@0.0.45 @angular/cli --no-save

We the "CLI Team" would like to apologize for the confusion.

Status

This issue has been resolved in version 1.6.6.

Updating

The steps to update your environment to the latest version containing the fix:

npm uninstall -g @angular/cli
npm cache clean
# if npm version is > 5 then use `npm cache verify` to avoid errors (or to avoid using --force)
npm install -g @angular/cli@latest

rm -rf node_modules dist # use rmdir /S/Q node_modules dist in Windows Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell
npm install --save-dev @angular/cli@latest
npm install

Explanation

The issue of [rxjs operator] is not a function is a result of the migration of the devkit repo to using "pipeable" (formerly "lettable") operators instead of the prototype patching approach that the Angular CLI was using prior to release 1.6.6 (which was just released). The commit which fixed it is here.

The issue is that the CLI was using operators that were not imported and relied on them being on the Observable object. When the devkit was updated it removed this function and the bug in the CLI was exposed. The latest version of the CLI is now using pipeable operators and therefore importing all of the operators needed to work with observables, so this issue has been resolved.

Thank you for your patience and for contributing by reporting this issue.

See @maymarx answer in angular/devkit#380:

adding
"@angular-devkit/schematics":"0.0.42", "@angular-devkit/core": "0.0.23", to the package.json fixes the problems if you need a quick fix before the weekend

I can offer no help. But I have deep sympathy as I see the same problem.

More Issues: