angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

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

Open rilwans opened this issue 8 years ago • 108 comments

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

rilwans avatar Jan 12 '18 22:01 rilwans

Also, this works for me

npm i @angular-devkit/[email protected] @angular/cli --no-save

Wael3bbas avatar Jan 18 '18 22:01 Wael3bbas

@mendhak's solution worked for me Angular CLI: 1.6.2 Node: 9.3.0 OS: darwin x64

abalazsics avatar Jan 19 '18 16:01 abalazsics

I just upgraded Angular CLI and ran into this issue generating components. I noticed I didn't get this issue when I created a new project.

The fix for me was to remove the node_modules folder and package-lock.json. Then re-install node modules using npm install

Angular CLI: 1.6.5 Node: 8.7.0 OS: darwin x64

package.json
{
  "name": "whatsnew",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^5.2.0",
    "@angular/common": "^5.2.0",
    "@angular/compiler": "^5.2.0",
    "@angular/core": "^5.2.0",
    "@angular/forms": "^5.2.0",
    "@angular/http": "^5.2.0",
    "@angular/platform-browser": "^5.2.0",
    "@angular/platform-browser-dynamic": "^5.2.0",
    "@angular/router": "^5.2.0",
    "core-js": "^2.4.1",
    "rxjs": "^5.5.6",
    "zone.js": "^0.8.19"
  },
  "devDependencies": {
    "@angular/cli": "1.6.5",
    "@angular/compiler-cli": "^5.2.0",
    "@angular/language-service": "^5.2.0",
    "@types/jasmine": "~2.8.3",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "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.1.2",
    "ts-node": "~4.1.0",
    "tslint": "~5.9.1",
    "typescript": "~2.5.3"
  }
}

onedotover avatar Jan 19 '18 19:01 onedotover

That helped me:

  • Removed node_modules and re-installed by npm install
  • Installed npm i --save-dev @angular-devkit/core

ssokurenko avatar Jan 19 '18 20:01 ssokurenko

@ssokurenko solution worked for me after the other solutions failed to work....

foote-Greg avatar Jan 20 '18 16:01 foote-Greg

same thing for me on 1.6.5 it seems. Deleted node_modules and package-lock.json and reinstalled. Now it's all good

intellix avatar Jan 20 '18 23:01 intellix

Thanks @gurgelv its working.

chandurams avatar Jan 21 '18 01:01 chandurams

Thanks @ssokurenko . Your solution worked for me (CLI 1.6.5)!

morismael avatar Jan 21 '18 19:01 morismael

Why is this issue closed? I can't seem to get rid of it at all.

Siafu avatar Jan 21 '18 22:01 Siafu

Thanks @ssokurenko . Your solution worked for me (CLI 1.6.5)!

topikus avatar Jan 22 '18 13:01 topikus

Sorry, still get same error! I have deleted my node_modules folder and reinstalled my dependencies. What can I do now? Thanks, Markus

My environment: Angular CLI: 1.6.5 Node: 6.9.1 OS: win32 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.12 @angular/material: 5.1.0 @angular-devkit/build-optimizer: 0.0.41 @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.16 typescript: 2.4.2 webpack: 3.10.0

markus-heinisch avatar Jan 22 '18 13:01 markus-heinisch

The workaround in the commit by @jgarciao was the only thing that worked for me.

EDIT: for clarity, needed to delete node-modules folder and npm install after making the changes

Justin-MacIntosh avatar Jan 22 '18 14:01 Justin-MacIntosh

still same problem. Tried @jgarciao 's solution - not working for me :(

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

marc101101 avatar Jan 22 '18 14:01 marc101101

I'm also facing this issue with the following configuration:

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

@angular/cli: 1.6.5
@angular-devkit/build-optimizer: 0.0.41
@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.16
typescript: 2.4.2
webpack: 3.10.0

However, the following is working on another project on the same machine:

Angular CLI: 1.5.0
Node: 6.11.2
OS: win32 x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic, router

@angular/cli: 1.5.0
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.0
typescript: 2.4.2
webpack: 3.1.0

My global CLI version is 1.6.5

None of the solutions mentioned above are working for me.

Shouldn't this issue be opened again?

kanafghan avatar Jan 22 '18 15:01 kanafghan

@marc101101 Did you delete the node-modules folder, and npm install after making the fix in the commit?

Justin-MacIntosh avatar Jan 22 '18 15:01 Justin-MacIntosh

@Justin-MacIntosh deleting node_modules and ran npm install fixed my issue. Thanks

kchiragowni avatar Jan 22 '18 16:01 kchiragowni

The solution suggested by @jgarciao does not work for me, even after deleting all node modules. I also tried installing globally the packages, but still getting the same error. Any idea?

ilDon avatar Jan 23 '18 16:01 ilDon

@ghego1 check versions of your packages

Dok11 avatar Jan 23 '18 16:01 Dok11

@Dok11 Yes checked, they all seem in line with those suggested by @jgarciao:

"dependencies": {
    "@angular-devkit/schematics": "0.0.51",
    "@angular-devkit/core": "0.0.28",
    "@angular-redux/store": "^7.0.2",
    "@angular/animations": "^5.2.0",
    "@angular/cdk": "^5.0.4",
    "@angular/common": "^5.2.0",
    "@angular/compiler": "^5.2.0",
    "@angular/core": "^5.2.0",
    "@angular/flex-layout": "2.0.0-beta.12",
    "@angular/forms": "^5.2.0",
    "@angular/http": "^5.2.0",
    "@angular/material": "^5.0.4",
    "@angular/platform-browser": "^5.2.0",
    "@angular/platform-browser-dynamic": "^5.2.0",
    "@angular/platform-server": "^5.2.0",
    "@angular/router": "^5.2.0",
    "@nguniversal/express-engine": "^5.0.0-beta.5",
    "@ngx-cache/core": "^5.0.0",
    "@ngx-translate/core": "^9.1.1",
    "@ngx-translate/http-loader": "^2.0.1",
    "@ngx-universal/translate-loader": "^5.0.0",
    "@types/lodash": "^4.14.92",
    "core-js": "^2.5.3",
    "hammerjs": "^2.0.8",
    "lodash": "^4.17.4",
    "ngx-cookie-service": "^1.0.10",
    "q": "^1.5.0",
    "redux": "^3.7.2",
    "rxjs": "^5.5.6",
    "spider-detector": "^1.0.18",
    "zone.js": "^0.8.20"
  },
  "devDependencies": {
    "@angular/cli": "^1.6.5",
    "@angular/compiler-cli": "^5.2.1",
    "@angular/language-service": "^5.2.1",
    "@types/jasmine": "~2.8.4",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~9.3.0",
    "angular-tslint-rules": "^1.1.0",
    "codelyzer": "~4.0.2",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.3.3",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.2.2",
    "ts-loader": "^3.2.0",
    "ts-node": "~4.1.0",
    "tslint": "^5.9.1",
    "typescript": ">=2.4.2 <2.6.0",
    "webpack-node-externals": "^1.6.0"
  }

ilDon avatar Jan 23 '18 17:01 ilDon

Deleting yarn.lock and running yarn install again helped me.

MartinNuc avatar Jan 23 '18 18:01 MartinNuc