Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

rules_typescript doesn't give an error when used with a wrong version of rules_nodejs #12

@jelbourn

Description

@jelbourn
ERROR: /usr/local/google/home/jelbourn/material2/src/cdk/keycodes/BUILD.bazel:5:1: Compiling TypeScript (devmode) //src/cdk/keycodes:keycodes failed (Exit 1)
Compilation failed TypeError: global.gc is not a function
    at Socket.<anonymous> (/usr/local/google/home/jelbourn/.cache/bazel/_bazel_jelbourn/2010aad45cf3f55bb7127948064a6254/execroot/angular_material_src/bazel-out/host/bin/external/build_bazel_rules_typescript/internal/tsc_wrapped/worker.js:122:28)
    at emitNone (events.js:86:13)
    at Socket.emit (events.js:185:7)
    at emitReadable_ (_stream_readable.js:432:10)
    at emitReadable (_stream_readable.js:426:7)
    at readableAddChunk (_stream_readable.js:187:13)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:551:20)
Target //src/lib/core:core failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.379s, Critical Path: 0.07s
FAILED: Build did NOT complete successfully

I encounter this error only sometimes when building the cdk/keycodes target:

package(default_visibility=["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")

ts_library(
  name = "keycodes",
  srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
  module_name = "@angular/cdk/keycodes",
  deps = [],
  tsconfig = ":tsconfig-build.json",
)

If I bazel clean and rebuild it goes away, but then sneaks back at some point- I'm not sure what triggers it

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions