-
-
Notifications
You must be signed in to change notification settings - Fork 144
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
pnpm has released a new version, and it pumps the lockfileVersion from to 6.1, causing npm_translate_lock to fail with the error
INFO: Repository npm instantiated at:
/Users/aegiro/code-mine/monorepo/WORKSPACE:90:19: in <toplevel>
/private/var/tmp/_bazel_aegiro/bf69521a81fccf735bc33d4516805405/external/aspect_rules_js/npm/private/npm_translate_lock.bzl:519:28: in npm_translate_lock
Repository rule npm_translate_lock_rule defined at:
/private/var/tmp/_bazel_aegiro/bf69521a81fccf735bc33d4516805405/external/aspect_rules_js/npm/private/npm_translate_lock.bzl:131:42: in <toplevel>
ERROR: An error occurred during the fetch of repository 'npm':
Traceback (most recent call last):
File "/private/var/tmp/_bazel_aegiro/bf69521a81fccf735bc33d4516805405/external/aspect_rules_js/npm/private/npm_translate_lock.bzl", line 87, column 41, in _npm_translate_lock_impl
state = npm_translate_lock_state.new(rctx)
File "/private/var/tmp/_bazel_aegiro/bf69521a81fccf735bc33d4516805405/external/aspect_rules_js/npm/private/npm_translate_lock_state.bzl", line 583, column 10, in _new
_init(priv, rctx, label_store)
File "/private/var/tmp/_bazel_aegiro/bf69521a81fccf735bc33d4516805405/external/aspect_rules_js/npm/private/npm_translate_lock_state.bzl", line 61, column 23, in _init
_load_lockfile(priv, rctx, label_store)
File "/private/var/tmp/_bazel_aegiro/bf69521a81fccf735bc33d4516805405/external/aspect_rules_js/npm/private/npm_translate_lock_state.bzl", line 494, column 70, in _load_lockfile
importers, packages, patched_dependencies = utils.parse_pnpm_lock(rctx.read(label_store.path("pnpm_lock")))
File "/private/var/tmp/_bazel_aegiro/bf69521a81fccf735bc33d4516805405/external/aspect_rules_js/npm/private/utils.bzl", line 154, column 29, in _parse_pnpm_lock
_assert_lockfile_version(lockfile_version)
File "/private/var/tmp/_bazel_aegiro/bf69521a81fccf735bc33d4516805405/external/aspect_rules_js/npm/private/utils.bzl", line 199, column 13, in _assert_lockfile_version
fail(msg)
This can be reproduced by installing pnpm version 8.6.0 and then checking out https://github.com/agirorn/monorepo and running pnpm install
and then run bazel build //...
The workaround for now: is using an older version 8.5.1 of pnpm to install add modules.
For Mac users that have pnpm installed via homebrew have to remove it and install the 8.5.1 version npm
npm install -g pnpm@8.5.1
OR
yarn global add pnpm@8.5.1
Version
Development (host) and target OS/architectures:
Output of bazel --version
: aspect 5.3.4
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
or MODULE.bazel
file:
See here https://github.com/agirorn/monorepo
How to reproduce
This can be reproduced by installing pnpm version 8.6.0 and then checking out https://github.com/agirorn/monorepo and running `pnpm install` and then run `bazel build //...`
Any other information?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working