Skip to content

Bootstrap issue when pulling @bazel/typescript from npm #275

@gregmagolan

Description

@gregmagolan

When pulling @bazel/typescript from npm, there is a bootstrap issue since a user's WORKSPACE will need to reference @build_bazel_rules_typescript,

load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
ts_setup_workspace()

but until you run yarn or npm that file does not exist as it comes from node_modules,

local_repository(
    name = "build_bazel_rules_typescript",
    path = "node_modules/@bazel/typescript",
)

This means that you can't run bazel run @nodejs//:yarn without first running a locally installed version of yarn or npm.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions