Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Expected package major version to equal @build_bazel_rules_nodejs major version #129

Closed
flolu opened this issue Sep 7, 2020 · 0 comments

Comments

@flolu
Copy link

flolu commented Sep 7, 2020

Description

I've tried to setup this rules as described in the README. But it seems as if it is not compatible with rules_node v2

Errors seen

INFO: Repository rules_typescript_proto_deps instantiated at:
  no stack (--record_rule_instantiation_callstack not enabled)
Repository rule yarn_install defined at:
  /home/flolu/.cache/bazel/_bazel_flolu/c71b9b5f37ddd466ffb3ad43a8d3ce50/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:411:31: in <toplevel>
ERROR: An error occurred during the fetch of repository 'rules_typescript_proto_deps':
   yarn_install failed: [1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.1.2: The platform "linux" is incompatible with this module.
info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
 (warning " > @bazel/karma@1.7.0" has unmet peer dependency "jasmine-core@>=2.0.0".
warning " > @bazel/rollup@1.7.0" has incorrect peer dependency "rollup@>=1.0.0 <2.0.0".
error /home/flolu/.cache/bazel/_bazel_flolu/c71b9b5f37ddd466ffb3ad43a8d3ce50/external/rules_typescript_proto_deps/node_modules/@bazel/karma: Command failed.
Exit code: 1
Command: node npm_version_check.js
Arguments: 
Directory: /home/flolu/.cache/bazel/_bazel_flolu/c71b9b5f37ddd466ffb3ad43a8d3ce50/external/rules_typescript_proto_deps/node_modules/@bazel/karma
Output:
/home/flolu/.cache/bazel/_bazel_flolu/c71b9b5f37ddd466ffb3ad43a8d3ce50/external/rules_typescript_proto_deps/node_modules/@bazel/karma/npm_version_check.js:17
  throw new Error(`Expected package major version to equal @build_bazel_rules_nodejs major version
  ^

Error: Expected package major version to equal @build_bazel_rules_nodejs major version
    @bazel/karma - 1.7.0  
    @build_bazel_rules_nodejs - 2.0.3
  See https://github.com/bazelbuild/rules_nodejs/wiki/Avoiding-version-skew
    at Object.<anonymous> (/home/flolu/.cache/bazel/_bazel_flolu/c71b9b5f37ddd466ffb3ad43a8d3ce50/external/rules_typescript_proto_deps/node_modules/@bazel/karma/npm_version_check.js:17:9)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
    at internal/main/run_main_module.js:17:11
)
ERROR: /home/flolu/Downloads/drakery/packages/schema/BUILD.bazel:19:25: //packages/schema:ts_auth_proto depends on @rules_typescript_proto_deps//ts-protoc-gen/bin:protoc-gen-ts in repository @rules_typescript_proto_deps which failed to fetch. no such package '@rules_typescript_proto_deps//ts-protoc-gen/bin': yarn_install failed: [1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.1.2: The platform "linux" is incompatible with this module.
info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
 (warning " > @bazel/karma@1.7.0" has unmet peer dependency "jasmine-core@>=2.0.0".
warning " > @bazel/rollup@1.7.0" has incorrect peer dependency "rollup@>=1.0.0 <2.0.0".
error /home/flolu/.cache/bazel/_bazel_flolu/c71b9b5f37ddd466ffb3ad43a8d3ce50/external/rules_typescript_proto_deps/node_modules/@bazel/karma: Command failed.
Exit code: 1
Command: node npm_version_check.js
Arguments: 
Directory: /home/flolu/.cache/bazel/_bazel_flolu/c71b9b5f37ddd466ffb3ad43a8d3ce50/external/rules_typescript_proto_deps/node_modules/@bazel/karma
Output:
/home/flolu/.cache/bazel/_bazel_flolu/c71b9b5f37ddd466ffb3ad43a8d3ce50/external/rules_typescript_proto_deps/node_modules/@bazel/karma/npm_version_check.js:17
  throw new Error(`Expected package major version to equal @build_bazel_rules_nodejs major version
  ^

Error: Expected package major version to equal @build_bazel_rules_nodejs major version
    @bazel/karma - 1.7.0  
    @build_bazel_rules_nodejs - 2.0.3
  See https://github.com/bazelbuild/rules_nodejs/wiki/Avoiding-version-skew
    at Object.<anonymous> (/home/flolu/.cache/bazel/_bazel_flolu/c71b9b5f37ddd466ffb3ad43a8d3ce50/external/rules_typescript_proto_deps/node_modules/@bazel/karma/npm_version_check.js:17:9)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
    at internal/main/run_main_module.js:17:11
)

Minimal Reproduction

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_typescript_proto//:index.bzl", "typescript_proto_library")

proto_library(
    name = "auth_proto",
    srcs = ["auth.proto"],
)

typescript_proto_library(
    name = "ts_auth_proto",
    proto = ":auth_proto",
)

Your Environment

What operating system are you using?

Ubuntu 20.04 LTS

What version of bazel are you using?

3.4.1

What version of the library are you using?

51c7c5995f5de89ea1bbd64d956fd589f1c03357ab6768032930fadc2570f6a8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants