我正在尝试创建一个新的 Angular 项目。我按照本网站中提到的步骤进行操作。 https://github.com/angular/angular-cli
当我尝试使用 ng new
命令创建新项目时,出现错误。
E:\Code\> ng new some-name
Error: dryRunSink.commit(...).ignoreElements(...).concat is not a function
dryRunSink.commit(...).ignoreElements(...).concat is not a function
这是 ng serve
的结果
Angular CLI: 1.6.4
Node: 6.11.4
OS: win32 x64
编辑: 看起来每个人都遇到了这个错误。 https://github.com/angular/angular-cli/issues/9194
最佳答案
这里是 git issue 的链接:https://github.com/angular/devkit/issues/380
解决方案(临时解决方案,直到他们解决问题): 将以下行添加到 package.json 可解决问题
"@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 issue 中提供了这些解决方案,
关于angular - ng new 给出 dryRunSink.(...).concat is not a function 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48234673/