Skip to content

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

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

Closed
rilwans opened this issue Jan 12, 2018 · 108 comments
Closed

Comments

@rilwans
Copy link

rilwans commented Jan 12, 2018

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

@alexsapran
Copy link

alexsapran commented Jan 12, 2018

same, just installed the cli and getting the same error.
[Update]
Tried a couple of versions

Angular CLI: 1.7.0-beta.0
Node: 9.4.0
OS: darwin x64
Angular:
----
Angular CLI: 1.6.0
Node: 9.4.0
OS: darwin x64
Angular:
----
Angular CLI: 1.6.3
Node: 9.4.0
OS: darwin x64
Angular:

With the same result

@ghost
Copy link

ghost commented Jan 12, 2018

I am getting this error, too.

Angular CLI: 1.6.4
Node: 7.10.0
OS: linux x64
Angular:
...

@j-c-levin
Copy link

Me too
Angular cli: 1.6.4
Node: 8.8.1
OS: Windows 10

@fhnaseer
Copy link

Same error,
Angular CLI: 1.6.4
Node: 8.9.4
OS: win32 x64

@nilsfriess
Copy link

Same Error:
Angular CLI: 1.6.4
Node: 9.4.0
OS: linux x64
npm --version: 5.6.0

@anankassis
Copy link

oh my god ! i am having the same problem !
in addition now ! i re down graded to my working version 1.5.3 , that was working all the time perfectly, and still ! i receive the same error ! nothing is fixing my problem !!! HELP NEEDED

@derobiom
Copy link

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

@mendhak
Copy link

mendhak commented Jan 12, 2018

Following this worked -

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

@nilsfriess
Copy link

nilsfriess commented Jan 12, 2018

angular/devkit@e1f4356#diff-0dfbc02885bfb31a1e86e72520aad335

This is the commit in the schematics.ts file in the package @angular-devkit/schematics which is causing the problem

As this is just some refactoring, maybe it would be best to just go back.
See this issue on the devkit github: angular/devkit#380

@nilsfriess
Copy link

nilsfriess commented Jan 12, 2018

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

@slick-k
Copy link

slick-k commented Jan 12, 2018

Same issue here too guys and gals!

@derobiom
Copy link

Adding
"@angular-devkit/schematics":"0.0.42", "@angular-devkit/core": "0.0.23", to the package.json (dev dependencies) worked for me also.

@anankassis
Copy link

how you add those things you talked about ?!
exactly ???
like what to add ?? just "":"0.0.42", "": "0.0.23" ???

@iamviswajith
Copy link

i have the same issue, after adding "@angular-devkit/schematics":"0.0.42", "@angular-devkit/core": "0.0.23", to the package.json, i uninstalled angular cli and re installed it, but the same issue pops up

@gurgelv
Copy link

gurgelv commented Jan 12, 2018

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

@iamviswajith
Copy link

thanks @gurgelv that worked 👍

@ricartoons
Copy link

Thanks @gurgelv, works!

@anankassis
Copy link

That will make you able to create a new project correct !!
but try to do
ng new component name
you will still get : Error: dryRunSink.commit(...).ignoreElements(...).concat is not a function
dryRunSink.commit(...).ignoreElements(...).concat is not a function

@IgorKharkiv
Copy link

IgorKharkiv commented Jan 12, 2018

Adding

"@angular-devkit/schematics":"0.0.42", 
"@angular-devkit/core": "0.0.23" 

into devDependencies don't resolve problem in my case. The build still broken.

@LeezMito
Copy link

i have of same problem :C

@salimperwaiz
Copy link

I am also stuck with same error:
Angular CLI: 1.6.4
Node: 8.9.4
OS: win32 x64
Angular:

@tarah-s
Copy link

tarah-s commented Jan 12, 2018

Great solution @gurgelv works perfect!

@casehill
Copy link

thank u! @gurgelv it works fine!

@derobiom
Copy link

For some reason I had a earlier local version of the CLI? Make sure you don't. Mine seems to be working now (not getting this error) with the above additions to package.json BUT I think there may be other problems. But I'm able to create components and modules.
Angular CLI: 1.6.4
Node: v8.9.1
OS: Win10 x64

@salimperwaiz
Copy link

Thank you @gurgelv it works!

@anankassis
Copy link

I Needed to npm install , after adding those lines to the dev dependencies , and i think now it is working

@DiegoRodriguezTandil
Copy link

DiegoRodriguezTandil commented Jan 12, 2018

I have the same error: "Error: dryRunSink.commit(...)"

  • Node.js: v9.4.0
  • npm: 5.6.0
  • Angular CLI: 1.6.4

Maybe I would to reinstall Angular CLI 1.5
The commands that I used

  • sudo npm un -g @angular/cli
  • sudo npm cache clean --force
  • sudo npm i -g @angular/cli@1.5

@cdCarlos
Copy link

The same problem here.

Node: 8.5
NPM: 5.3

ng-cli: 1.4.3
ng-cli: 1.5.3
ng-cli: 1.6.4

I've tried with the above cli's versions and is the same problem. For 1.4 and 1.5 cli version I can't create new components, with 1.6 version I can't create new projects.

@Metrophobe
Copy link

i don't get it ... was working fine just a while ago and then i got the dreaded error why is rolling back to an older version of the cli still producing the same error? tried 1.5.3

@Brocco
Copy link
Contributor

Brocco commented Jan 13, 2018

There is a fix about to be released for this based upon PR angular/devkit#384

@RonakR
Copy link

RonakR commented Jan 24, 2018

I have the proper rxjs version (5.5.2) along with all the proper version above and I still see the same error.

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

@markus-heinisch
Copy link

Hi, has someone tried to solve the problem with angular-cli v1.7.0-beta.1?
I'm referring to:

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

@andreimcristof
Copy link

have the exact same issue right now when using ng generate component

@olufemioyedepo
Copy link

@andreimcristof try this
npm install @angular-devkit/schematics@0.0.45 @angular/cli --no-save

@yogibimbi
Copy link

yogibimbi commented Jan 24, 2018

seems updating to

"@angular-devkit/schematics":"0.0.51",
"@angular-devkit/core": "0.0.28",

and deleting node_modules + npm install might have done the trick for me. But I also updated some other versions of ng libraries that were warned about after previous installs, so I can't say with absolute certainty that the above two lines are what pushed it over the top.
So, at least ng g service bla now works.

@NickToony
Copy link

NickToony commented Jan 24, 2018

Also experiencing this issue, tried various fixes suggested here. I don't think this issue should be closed.

Error:

ng g component name
Error: dryRunSink.commit(...).ignoreElements is not a function
dryRunSink.commit(...).ignoreElements is not a function

And version info:

Angular CLI: 1.6.5
Node: 9.2.0
OS: darwin x64
Angular: 5.2.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cdk: 5.1.0
@angular/cli: 1.6.5
@angular/flex-layout: 2.0.0-beta.10-4905443
@angular/material: 5.1.0
@angular-devkit/build-optimizer: 0.0.41
@angular-devkit/core: 0.0.28
@angular-devkit/schematics: 0.0.45
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.5
@schematics/angular: 0.1.16
typescript: 2.4.2
webpack-bundle-analyzer: 2.9.2
webpack: 3.10.0

EDIT: My problem was with using rxjs 5.5.2. I changed to the following dev dependencies:

"@angular-devkit/core": "0.0.28",
"@angular-devkit/schematics": "0.0.51",

and updated to rxjs 5.5.6

"rxjs": "5.5.6",

and then deleted my node_modules and package-lock, then npm install. Hope this helps someone.

@titusfx
Copy link

titusfx commented Jan 24, 2018

@mendhak solution didn't work for me. I got a new one after that:

Error: Path "/app/app.module.ts" does not exist.
Path "/app/app.module.ts" does not exist.

I don't think this issue should be closed.

@jorgeso
Copy link

jorgeso commented Jan 24, 2018

I've tried every single solution offered here and nothing works. This is ridiculous. Why is this issue closed?

@glebmachine
Copy link

glebmachine commented Jan 25, 2018 via email

@markus-heinisch
Copy link

I have found a solution for my project: I have deleted my node_modules folder, checked my package.json and installed my dependencies in several steps:

  1. Angular dependencies and devDependencies (all the dependencies which come with ng new app)
  2. Material deps
  3. all other dependencies

Here is my package.json
"dependencies": { "@angular/animations": "~5.2.2", "@angular/cdk": "^5.1.0", "@angular/common": "~5.2.2", "@angular/compiler": "~5.2.2", "@angular/core": "~5.2.2", "@angular/flex-layout": "2.0.0-beta.12", "@angular/forms": "~5.2.2", "@angular/http": "~5.2.2", "@angular/material": "^5.1.0", "@angular/platform-browser": "~5.2.2", "@angular/platform-browser-dynamic": "~5.2.2", "@angular/router": "~5.2.2", "classlist.js": "1.1.20150312", "core-js": "2.5.3", "hammerjs": "2.0.8", "intl": "1.2.5", "moment": "2.20.1", "moment-business": "3.0.1", "parse-decimal-number": "1.0.0", "rxjs": "^5.5.6", "web-animations-js": "2.3.1", "zone.js": "0.8.4" }, "devDependencies": { "@angular/cli": "^1.6.5", "@angular/compiler-cli": "~5.2.2", "@angular/language-service": "~5.2.2", "@types/jasmine": "2.5.38", "@types/node": "6.0.96", "codelyzer": "4.1.0", "jasmine-core": "2.6.4", "jasmine-spec-reporter": "4.1.1", "karma": "1.4.1", "karma-chrome-launcher": "2.0.0", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "0.2.0", "karma-jasmine": "1.1.0", "karma-jasmine-html-reporter": "0.2.2", "protractor": "5.1.2", "replace-in-file": "2.6.4", "sass-lint": "1.10.2", "ts-node": "3.2.2", "tslint": "5.7.0", "typescript": "2.4.2" }

@splincode
Copy link

Not working

mivanov@9TDQH5J MINGW64 /c/Develop/rosnfo-ui/rosnfo-ui/src/app/test (hotfix/RSBNFO-302/sms-product-bugfix)
$ ng g c Test
Error: dryRunSink.commit(...).ignoreElements is not a function
dryRunSink.commit(...).ignoreElements is not a function

mivanov@9TDQH5J MINGW64 /c/Develop/rosnfo-ui/rosnfo-ui/src/app/test (hotfix/RSBNFO-302/sms-product-bugfix)
$ ng -v

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
    
Angular CLI: 1.6.5
Node: 8.9.1
OS: win32 x64
Angular: 5.2.2
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic, router

@angular/cdk: 5.1.0
@angular/cli: 1.6.5
@angular/material: 5.1.0
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.28
@angular-devkit/schematics: 0.0.51
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.5
@schematics/angular: 0.1.17
typescript: 2.4.2
webpack-bundle-analyzer: 2.9.2
webpack: 3.10.0

@roddy
Copy link

roddy commented Jan 25, 2018

This was closed as no longer an issue, but I just installed @angular/cli (using npm install -g @angular/cli@latest) and cannot create a new app. Is 1.6.5 still pulling in the old dependency? I was under the impression, per #9283 (comment) that this was no longer an issue.

C:\workspace>ng -v

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.6.5
Node: 6.11.1
OS: win32 x64
Angular:
...

C:\workspace>ng new test
Error: dryRunSink.commit(...).ignoreElements is not a function
dryRunSink.commit(...).ignoreElements is not a function

C:\workspace>npm list -g --depth=1
C:\Users\me\AppData\Roaming\npm
+-- @angular/cli@1.6.5
| +-- @angular-devkit/build-optimizer@0.0.42
| +-- @angular-devkit/core@0.0.29
| +-- @angular-devkit/schematics@0.0.52
| +-- @ngtools/json-schema@1.1.0
| +-- @ngtools/webpack@1.9.5
| +-- @schematics/angular@0.1.17
| +-- autoprefixer@7.2.5
| +-- chalk@2.2.2
| +-- circular-dependency-plugin@4.2.1
| +-- common-tags@1.5.1
| +-- copy-webpack-plugin@4.2.3
| +-- core-object@3.1.5
| +-- css-loader@0.28.7
| +-- cssnano@3.10.0
| +-- denodeify@1.2.1
| +-- ember-cli-string-utils@1.1.0
| +-- exports-loader@0.6.4
| +-- extract-text-webpack-plugin@3.0.2
| +-- file-loader@1.1.5
| +-- fs-extra@4.0.2
| +-- glob@7.1.2
| +-- html-webpack-plugin@2.30.1
| +-- istanbul-instrumenter-loader@3.0.0
| +-- karma-source-map-support@1.2.0
| +-- less@2.7.3
| +-- less-loader@4.0.5
| +-- license-webpack-plugin@1.1.1
| +-- loader-utils@1.1.0
| +-- lodash@4.17.4
| +-- memory-fs@0.4.1
| +-- minimatch@3.0.4
| +-- node-modules-path@1.0.1
| +-- node-sass@4.7.2
| +-- nopt@4.0.1
| +-- opn@5.1.0
| +-- portfinder@1.0.13
| +-- postcss-import@11.0.0
| +-- postcss-loader@2.0.10
| +-- postcss-url@7.3.0
| +-- raw-loader@0.5.1
| +-- resolve@1.5.0
| +-- rxjs@5.5.3
| +-- sass-loader@6.0.6
| +-- semver@5.4.1
| +-- silent-error@1.1.0
| +-- source-map-loader@0.2.3
| +-- source-map-support@0.4.18
| +-- style-loader@0.13.2
| +-- stylus@0.54.5
| +-- stylus-loader@3.0.1
| +-- uglifyjs-webpack-plugin@1.1.6
| +-- url-loader@0.6.2
| +-- webpack@3.10.0
| +-- webpack-dev-middleware@1.12.2
| +-- webpack-dev-server@2.11.1
| +-- webpack-merge@4.1.1
| +-- webpack-sources@1.1.0
| `-- webpack-subresource-integrity@1.0.2
`-- npm-check-updates@2.13.0
  +-- bluebird@3.5.1
  +-- chalk@1.1.3
  +-- cint@8.2.1
  +-- cli-table@0.3.1
  +-- commander@2.12.2
  +-- fast-diff@1.1.2
  +-- find-up@1.1.2
  +-- get-stdin@5.0.1
  +-- json-parse-helpfulerror@1.0.3
  +-- lodash@4.17.4
  +-- node-alias@1.0.4
  +-- npm@3.10.10
  +-- npmi@2.0.1
  +-- semver@5.4.1
  +-- semver-utils@1.1.1
  +-- snyk@1.53.0
  +-- spawn-please@0.3.0
  `-- update-notifier@2.3.0

@larssn
Copy link

larssn commented Jan 25, 2018

Please reopen, still an issue

@Brocco
Copy link
Contributor

Brocco commented Jan 25, 2018

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.

@splincode
Copy link

@Brocco Thank you, it is worked))

@mhmo91
Copy link

mhmo91 commented Jan 26, 2018

@Brocco
We -The Developers- understand the complexity of such technology n we love n appreciate all of ur efforts BUT please take into consideration testing whatever new build before pushing, as a bug blocks n wastes thousands of hours of angular lovers, thanks for understanding, cheers!

@hugocaldeira
Copy link

@Brocco problem solved! Thank you!

josipledic added a commit to OpenTOSCA/winery that referenced this issue Jan 30, 2018
@LunoDaniel
Copy link

Thank you @gurgelv, that's works fine for me.

@CarMoreno
Copy link

@gurgelv You're a Rockstar!, thank you

@nyoman
Copy link

nyoman commented Apr 13, 2018

I had the same problem.
But this (npm install @angular-devkit/schematics@0.0.45 @angular/cli --no-save) solved my problem.

My big thanks go to Mendhak.

@Sharkesm
Copy link

I had the same problem but not quite sure if it might work for the rest of you guys, but essentially i deleted node_module folder then uninstalled @angular/cli and re-install it once again but with higher version and finally updated the current node.

@Herotko
Copy link

Herotko commented Jun 7, 2018

I was helped

"@angular-devkit/ сore": "^0.6.8",
"@angular-devkit/ schematics": "^0.6.8",
"@angular/cli": "^1.7.4",
"@angular/compiler-cli": "^5.1.1",

@zshlomyz
Copy link

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.

Hi, The suggested version 1.6.6 is compatible with Angular 5? If no, there is a different version that is compatible & work properly?
Regards

@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