angular - ng new 给出 dryRunSink.(...).concat is not a function 错误

标签 angular angular-cli

我正在尝试创建一个新的 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/

相关文章:

html - 在不知道原始颜色的情况下在悬停时减轻 svg 部分

angular - 如何使用@Injectable providedIn root in angular 5 with getting

angular - 在 Angular2 中传递 i18n 文本作为组件参数

angular - 将 NgRx 和 Angular 升级到版本 7 后无法编译

angular-cli - 如何从观察者文件中排除 node_modules

unit-testing - Angular 2 单元测试 - @ViewChild 未定义

javascript - 如何使用 DoCheck 在月份选择器上反射(reflect)/突出显示手动输入的月份 [Angular]

deployment - openshift 3 上的 Angular Cli 部署

html - ng服务一次时如何防止自动重新加载页面?

css - 使用 angular cli 从 node_modules 文件夹添加 CSS