From a9d46e4952823c7b1422727f3d594f9900dc8632 Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Fri, 25 Jan 2019 14:43:36 -0800 Subject: [PATCH] fix(bazel): ng-new should run yarn install (#28381) yarn install was disabled in ng-new for Bazel schematics because Bazel manages its own node_modules dependencies and therefore there is no need to install dependencies twice. However, the first yarn install is needed for `ng` commands to work, most notably `ng build`. This commit restores the original behavior. PR Close #28381 --- integration/bazel-schematics/test.sh | 1 - packages/bazel/src/schematics/ng-new/index.ts | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/integration/bazel-schematics/test.sh b/integration/bazel-schematics/test.sh index 228adaa909..5b57a8f288 100755 --- a/integration/bazel-schematics/test.sh +++ b/integration/bazel-schematics/test.sh @@ -10,7 +10,6 @@ function testBazel() { ng new demo --collection=@angular/bazel --defaults --skip-git node replace_angular_repo.js "./demo/WORKSPACE" cd demo - yarn install cp ../package.json.replace ./package.json ng build ng test diff --git a/packages/bazel/src/schematics/ng-new/index.ts b/packages/bazel/src/schematics/ng-new/index.ts index 211ff2f8a6..e5e56d318b 100755 --- a/packages/bazel/src/schematics/ng-new/index.ts +++ b/packages/bazel/src/schematics/ng-new/index.ts @@ -201,10 +201,11 @@ export default function(options: Schema): Rule { validateProjectName(options.name); return chain([ - externalSchematic('@schematics/angular', 'ng-new', { - ...options, - skipInstall: true, - }), + externalSchematic( + '@schematics/angular', 'ng-new', + { + ...options, + }), addDevDependenciesToPackageJson(options), addDevAndProdMainForAot(options), schematic('bazel-workspace', options),