加载软件包“”时出错:读取扩展文件“ install_bazel_dependencies.bzl”时遇到错误:没有此类软件包“ @ npm //”

时间:2019-03-07 05:52:52

标签: typescript bazel

尝试在Windows上使用bazel构建tscode,但出现此错误,不确定其含义。

  • 内部版本标签:0.23.1
  • 构建目标: bazel-out / x64_windows-opt / bin / src / main / java / com / google / devtools / build / lib / bazel / BazelServer_deploy.jar
  • 平台:Windows 10

WORKSPACE 文件如下所示:

workspace(name = "istark")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "build_bazel_rules_nodejs",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.26.0/rules_nodejs-0.26.0.tar.gz"],
    sha256 = "5c86b055c57e15bf32d9009a15bcd6d8e190c41b1ff2fb18037b75e0012e4e7c",
)

load("@build_bazel_rules_nodejs//:defs.bzl","node_repositories", "npm_install")
npm_install(
    name = "npm",
    package_json = "//:package.json",
    package_lock_json = "//:package-lock.json",
)

node_repositories(
    package_json = [
        "//i-stark-common/main:package.json",
        "//:package.json"
    ]
)

# Install all Bazel dependencies needed for npm packages that supply Bazel rules
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
install_bazel_dependencies()


# Setup TypeScript toolchain
load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace")
ts_setup_workspace()

0 个答案:

没有答案