gpt4 book ai didi

Angular - 工作区中未设置配置

转载 作者:行者123 更新时间:2023-12-03 12:25:26 25 4
gpt4 key购买 nike

我尝试使用我的特定配置为我的 Angular 应用程序提供服务,但 Angular 无法识别它:

$ ng serve --configuration=fr
An unhandled exception occurred: Configuration 'fr' is not set in the workspace.
See "/tmp/ng-nyZPjp/angular-errors.log" for further details.

我的 angular.json :
"configurations": {
"fr": {
"aot": true,
"outputPath": "dist/fr/",
"i18nFile": "src/i18n/messages.fr.xlf",
"i18nFormat": "xlf",
"i18nLocale": "fr",
"i18nMissingTranslation": "error",
"baseHref": "/fr/"
},
"en": {
"aot": true,
"outputPath": "dist/en/",
"i18nFile": "src/i18n/messages.en.xlf",
"i18nFormat": "xlf",
"i18nLocale": "en",
"i18nMissingTranslation": "error",
"baseHref": "/en/"
},
...
ng serve --configuration=en完美运行

最佳答案

您收到的错误是因为您没有将其添加到您的服务 browserTarget 配置中:

"serve":{
"fr": {
"browserTarget": "custom-reports:build:fr"
},
}

关于Angular - 工作区中未设置配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58876170/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com