Ng new gives dryRunSink. (...). concat is not an error function

I am trying to create a new angular project. I followed the steps mentioned on this site. https://github.com/angular/angular-cli

When I try to create a new project using the command ng new, I get an error.

E:\Code\> ng new some-name
Error: dryRunSink.commit(...).ignoreElements(...).concat is not a function
dryRunSink.commit(...).ignoreElements(...).concat is not a function

Here is the result ng serve

Angular CLI: 1.6.4
Node: 6.11.4
OS: win32 x64

Edit: It looks like everyone is getting this error. https://github.com/angular/angular-cli/issues/9194

+4
source share
7 answers

Here is a link to the git issue: https://github.com/angular/devkit/issues/380

Solution (workaround until it fixes the problem): Adding the following lines to package.json fixes the problems

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

,

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

git,

+6

CLI Angular :

$  npm uninstall @angular/cli
$  npm cache clean
$  npm install -g @angular/cli@latest

. , Node ( 6.11.4 ). nvm Node. ,

$  nvm install 8.9.0 // for example, you can have another version
$  nvm use 8.9.0 // or the version you have installed

STILL , , @angular/cli. . ,

$  npm install -g @angular/cli@1.1.2 // for example
+3

, ​​ @ angular/cli 1.6.5

$ npm uninstall @angular/cli
$ npm cache clean
$ npm install -g @angular/cli@latest

:

$ rm -rf node_modules dist
$ npm install --save-dev @angular/cli@latest
$ npm install

, ..

+1

1.6.6.

, :

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    

[rxjs operator] , "" ( "" ) , AngularCLI 1.6.6 ( ). , .

, CLI , , Observable. , , CLI . CLI , , .

:
https://github.com/angular/angular-cli/issues/9194#issuecomment-360615868

+1

@ angular/cli@1.6.4

, , , , , 1.3.2, :

1.3.2

$ npm uninstall -g @angular/cli $ npm cache clean $ npm install -g @angular/cli@1.3.2

, :

$ ng -v

0

:

"@angular-devkit/build-optimizer": "0.0.36",
"@angular-devkit/core": "0.0.22",
"@angular-devkit/schematics": "0.0.42",
"@schematics/angular": "^0.1.11",
"@schematics/schematics": "0.0.11"

0

angular/cli 1.6.4 ": dryRunSink.commit(...). ignoreElements "

@ angular/cli: 1.6.5, , , :

npm uninstall @angular/cli
npm install -g @angular/cli@latest

be sure to install dev so you can run things like npm start (ng serve) and run your project by setting:

npm install --save-dev @angular/cli@latest

Worked great for me.

0
source

Source: https://habr.com/ru/post/1692119/


All Articles