【发布时间】:2019-02-18 03:40:48
【问题描述】:
我正在尝试创建一个新的 Angular 项目并添加 @angular/material 原理图。但它失败了这个错误:
Installed packages for tooling via npm.
Your project is not using the default configuration for build and test. The Angular Material schematics can only be used with the default configuration
为了创建我的项目并从头开始添加材料原理图,我执行了以下命令:
nvm use v10.10.0
npm install -g @angular/cli # Version is : @angular/cli@6.2.1
npm install -g @angular-devkit/schematics-cli # Version is : @angular-devkit/schematics-cli@0.8.1
ng new a
cd a
ng add @angular/material # -> Error here
有什么想法吗?谢谢!
【问题讨论】:
-
留意这个github issue登录Angular CLI repo
-
到那时你可以使用this workaround
-
谢谢@PankajParkar。那么现在,对我来说安装稳定版 Angular 的最佳方式是什么?
-
我已经看到了这个解决方法,但我没有在我的项目中找到 projects.YOUR-APP-NAME.targets
-
检查我的更新答案
标签: angular angular-cli angular-schematics