在 angular 6 中没有找到配置或获取/设置已被弃用 [英] No config found or get/set have been deprecated in angular 6
问题描述
ng config --global defaults.styleExt=scss
<块引用>
错误:找不到配置
ng set --global defaults.styleExt=scss
<块引用>
错误:get/set 已被弃用,取而代之的是 config 命令.
已安装的软件包版本
ngular CLI:6.0.3
节点:8.11.1
角度:6.0.2
@angular/cli 6.0.3
@ngtools/webpack 6.0.3
webpack 4.8.3
更新
以下命令在图像中给了我一个错误
ng 配置原理图.@schematics/angular:component '{ styleext: "scss"}'
ng set --global defaults.styleExt=scss
自 ng6 起已弃用.
你应该使用:
ng 配置原理图.@schematics/angular:component '{ styleext: "scss"}'
如果您想针对特定项目(将 {project} 替换为您的项目名称):
ng config projects.{project}.schematics.@schematics/angular:component '{ styleext: "scss"}'
ng config --global defaults.styleExt=scss
Error: config not found
ng set --global defaults.styleExt=scss
Error: get/set have been deprecated in favor of the config command.
Installed Packages versions
ngular CLI: 6.0.3
Node: 8.11.1
Angular: 6.0.2
@angular/cli 6.0.3
@ngtools/webpack 6.0.3
webpack 4.8.3
update
The following command gave me an error in the image
ng config schematics.@schematics/angular:component '{ styleext: "scss"}'
ng set --global defaults.styleExt=scss
is deprecated since ng6.
You should use:
ng config schematics.@schematics/angular:component '{ styleext: "scss"}'
If you want to target a specific project (replace {project} with your project's name):
ng config projects.{project}.schematics.@schematics/angular:component '{ styleext: "scss"}'
这篇关于在 angular 6 中没有找到配置或获取/设置已被弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!