build: set symlink_node_modules = False for yarn_install in main WORKSPACE and bazel schematics (#30627)

This is needed to work-around issue: yarn_install & npm_install with managed directories can't handle deleted or manually regenerated node_modules folder [https://github.com/bazelbuild/rules_nodejs/issues/802]
Underlying issue has been fixed in Bazel https://github.com/bazelbuild/bazel/issues/8487 but hasn't landed in a release yet

PR Close #30627
This commit is contained in:
Greg Magolan 2019-06-10 11:35:03 -07:00 committed by Igor Minar
parent 532c1cb485
commit 5193acb0a3
2 changed files with 17 additions and 0 deletions

View File

@ -65,7 +65,19 @@ node_repositories(
yarn_install(
name = "npm",
data = [
"//:tools/npm/@angular_bazel/index.js",
"//:tools/npm/@angular_bazel/package.json",
"//:tools/postinstall-patches.js",
"//:tools/yarn/check-yarn.js",
],
package_json = "//:package.json",
# Don't install devDependencies, they are large and not used under Bazel
prod_only = True,
# Temporarily disable node_modules symlinking until the fix for
# https://github.com/bazelbuild/bazel/issues/8487 makes it into a
# future Bazel release
symlink_node_modules = False,
yarn_lock = "//:yarn.lock",
)

View File

@ -52,7 +52,12 @@ Try running `yarn bazel` instead.
)
yarn_install(
name = "npm",
data = ["//:angular-metadata.tsconfig.json"],
package_json = "//:package.json",
# Temporarily disable node_modules symlinking until the fix for
# https://github.com/bazelbuild/bazel/issues/8487 makes it into a
# future Bazel release
symlink_node_modules = False,
yarn_lock = "//:yarn.lock",
)