Closed tomasdev closed 3 years ago
Perhaps related to https://github.com/bazelbuild/bazel/issues/2835 ?
May have been introduced by https://github.com/bazelbuild/rules_nodejs/pull/2193 ?
Trying out v3.0.0 rc-1 throws
ERROR: error loading package '': in /private/var/tmp/_bazel_tomas/3532d3aa619a717cd847371d067034d5/external/npm/@bazel/concatjs/index.bzl: in /private/var/tmp/_bazel_tomas/3532d3aa619a717cd847371d067034d5/external/npm/@bazel/concatjs/web_test/karma_web_test.bzl: Unable to find package for @io_bazel_rules_webtesting//web:web.bzl: The repository '@io_bazel_rules_webtesting' could not be resolved.
Edit: The error above is fixed by adding to WORKSPACE:
http_archive(
name = "io_bazel_rules_webtesting",
sha256 = "9bb461d5ef08e850025480bab185fd269242d4e533bca75bfb748001ceb343c3",
urls = ["https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.3/rules_webtesting.tar.gz"],
)
But then that gets you this error:
ERROR: error loading package '': in /private/var/tmp/_bazel_tomas/3532d3aa619a717cd847371d067034d5/external/npm/@bazel/concatjs/index.bzl: in /private/var/tmp/_bazel_tomas/3532d3aa619a717cd847371d067034d5/external/npm/@bazel/concatjs/web_test/karma_web_test.bzl: in /private/var/tmp/_bazel_tomas/3532d3aa619a717cd847371d067034d5/external/io_bazel_rules_webtesting/web/web.bzl: in /private/var/tmp/_bazel_tomas/3532d3aa619a717cd847371d067034d5/external/io_bazel_rules_webtesting/web/internal/custom_browser.bzl: Unable to find package for @bazel_skylib//lib:dicts.bzl: The repository '@bazel_skylib' could not be resolved.
Edit 2: which was fixed by also adding to WORKSPACE:
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
web_test_repositories()
Then tsconfig blew up and had to add the following to my main BUILD.bazel
exports_files(
["tsconfig.json"],
visibility = ["//visibility:public"],
)
The issue does simply not happen on v3.0.0-rc.1, so closing.
I was able to run the example with these:
git clone git@github.com:bazelbuild/rules_nodejs.git
git checkout 3.x
yarn add -D @bazel/bazelisk @bazel/ibazel
node_modules/@bazel/ibazel/bin/darwin_amd64/ibazel run :prodserver # didnt find a better way to execute the local ibazel lol but it works!
π¬ Minimal Reproduction
Run the following:
π₯ Exception or Error
π Your Environment
Operating System:
Output of
bazel version
:Rules_nodejs version:
Anything else relevant?
Am I doing something wrong perhaps?