From fe57fc30ed98e84e7e1f991704062cb192e94410 Mon Sep 17 00:00:00 2001 From: JounQin Date: Fri, 19 Jul 2019 12:10:28 +0800 Subject: [PATCH 1/4] chore: log loading angular cli config error It would be mush more helpful for users to check why the config is not loaded successfully --- app/angular/src/server/angular-cli_utils.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/angular/src/server/angular-cli_utils.ts b/app/angular/src/server/angular-cli_utils.ts index 1335d3ea4479..c4641017538f 100644 --- a/app/angular/src/server/angular-cli_utils.ts +++ b/app/angular/src/server/angular-cli_utils.ts @@ -4,6 +4,7 @@ import { getCommonConfig, getStylesConfig, } from '@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs'; +import { logger } from '@storybook/node-logger'; import { RuleSetRule, Configuration } from 'webpack'; @@ -64,6 +65,10 @@ export function getAngularCliParts(cliWebpackConfigOptions: any) { cliStyleConfig: getStylesConfig(cliWebpackConfigOptions), }; } catch (e) { + logger.warn( + 'Failed to get Angular Cli config, it will be ignored, please check the following error stack:' + ); + logger.trace(e); return null; } } From 9017b7c630dfc1b7f9fa10ef62182dfd2c5e9c02 Mon Sep 17 00:00:00 2001 From: JounQin Date: Fri, 19 Jul 2019 12:32:52 +0800 Subject: [PATCH 2/4] chore: trace seems not so good --- app/angular/src/server/angular-cli_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/angular/src/server/angular-cli_utils.ts b/app/angular/src/server/angular-cli_utils.ts index c4641017538f..e77a34ccf8f4 100644 --- a/app/angular/src/server/angular-cli_utils.ts +++ b/app/angular/src/server/angular-cli_utils.ts @@ -68,7 +68,7 @@ export function getAngularCliParts(cliWebpackConfigOptions: any) { logger.warn( 'Failed to get Angular Cli config, it will be ignored, please check the following error stack:' ); - logger.trace(e); + logger.warn(e); return null; } } From a5be3a707d6ce6e76d69a2a621f71d3c9ac462af Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Wed, 24 Jul 2019 16:40:03 +0800 Subject: [PATCH 3/4] Update angular-cli_utils.ts --- app/angular/src/server/angular-cli_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/angular/src/server/angular-cli_utils.ts b/app/angular/src/server/angular-cli_utils.ts index e77a34ccf8f4..c7578b72aba4 100644 --- a/app/angular/src/server/angular-cli_utils.ts +++ b/app/angular/src/server/angular-cli_utils.ts @@ -66,7 +66,7 @@ export function getAngularCliParts(cliWebpackConfigOptions: any) { }; } catch (e) { logger.warn( - 'Failed to get Angular Cli config, it will be ignored, please check the following error stack:' + 'Failed to load the Angular CLI config. Using the Storybook default config instead.' ); logger.warn(e); return null; From cf909a92b52b8cf6fdc5fcfaec64561dc2acc471 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Wed, 24 Jul 2019 16:41:02 +0800 Subject: [PATCH 4/4] Update angular-cli_utils.ts --- app/angular/src/server/angular-cli_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/angular/src/server/angular-cli_utils.ts b/app/angular/src/server/angular-cli_utils.ts index c7578b72aba4..1e4fd00e9306 100644 --- a/app/angular/src/server/angular-cli_utils.ts +++ b/app/angular/src/server/angular-cli_utils.ts @@ -66,7 +66,7 @@ export function getAngularCliParts(cliWebpackConfigOptions: any) { }; } catch (e) { logger.warn( - 'Failed to load the Angular CLI config. Using the Storybook default config instead.' + 'Failed to load the Angular CLI config. Using Storybook\'s default config instead.' ); logger.warn(e); return null;