ancient-vegetable-10556
03/27/2023, 5:35 PMbitter-ability-32190
03/27/2023, 5:36 PMgo
backend had/has this problem š
I just disable it in my local pants config for the repoancient-vegetable-10556
03/27/2023, 5:36 PMjavascript_sources
in BUILD filesbitter-ability-32190
03/27/2023, 5:36 PMancient-vegetable-10556
03/27/2023, 5:36 PMancient-vegetable-10556
03/27/2023, 5:37 PMworried-painter-31382
03/27/2023, 5:40 PMancient-vegetable-10556
03/27/2023, 5:40 PMworried-painter-31382
03/27/2023, 5:42 PMancient-vegetable-10556
03/27/2023, 5:43 PMworried-painter-31382
03/27/2023, 5:43 PMancient-vegetable-10556
03/27/2023, 5:44 PMworried-painter-31382
03/27/2023, 5:47 PMancient-vegetable-10556
03/27/2023, 5:51 PMworried-painter-31382
03/27/2023, 6:27 PM../lib/cli.js
) in there? Do you have read access in those folders?
Have you brew installed npm or node (should not be required, just wondering because I notice that for some reason /bin
is set in the process PATH)?ancient-vegetable-10556
03/27/2023, 6:27 PMancient-vegetable-10556
03/27/2023, 6:27 PMancient-vegetable-10556
03/27/2023, 6:29 PMchrisjrn@chrisjrns-MacBook-Pro pants-sandbox-03GF3M % ls -la
total 72
drwxr-xr-x 8 chrisjrn staff 256 Mar 27 11:28 .
drwx------@ 508 chrisjrn staff 16256 Mar 27 11:28 ..
lrwxr-xr-x 1 chrisjrn staff 45 Mar 27 11:28 ._npm -> /Users/chrisjrn/.cache/pants/named_caches/npm
lrwxr-xr-x 1 chrisjrn staff 155 Mar 27 11:28 __node -> /private/var/folders/0m/h2n902qn38b8555xq8z0w_h40000gn/T/immutable_inputs9SG4Ex/.tmpXga02S/a97a3f6ba08afdca934b08117b3f19f04975937860fa883bf39cc26c20ec8406
-rwxr-xr-x 1 chrisjrn staff 357 Mar 27 11:28 __run.sh
-rw-r--r-- 1 chrisjrn staff 23261 Mar 27 11:28 package-lock.json
-rw-r--r-- 1 chrisjrn staff 528 Mar 27 11:28 package.json
-rw-r--r-- 1 chrisjrn staff 1452 Mar 27 11:28 script.cjs
worried-painter-31382
03/27/2023, 6:29 PM__node
is the place where I'd expect the hermetic node installation beworried-painter-31382
03/27/2023, 6:30 PMlib/cli.js
(it's an node/npm internal script) to beworried-painter-31382
03/27/2023, 6:49 PMnode
your __run.sh
eventually picks up. I'm not very good with mac but I see at least /usr/bin/env bash
and usr/bin/env node
shebangs in the code path to where you hit the error, so maybe the other installs are polluting the sandbox somehow? Still doesn't really explain why a node install is missing lib/cli.js, but maybe that is just a symptom of something else?ancient-vegetable-10556
03/27/2023, 6:50 PMenv
, things are probably going to go wrong šancient-vegetable-10556
03/27/2023, 6:50 PMworried-painter-31382
03/27/2023, 6:50 PM/bin
to it isn't considered specific š
ancient-vegetable-10556
03/27/2023, 6:51 PMworried-painter-31382
03/27/2023, 6:51 PMancient-vegetable-10556
03/27/2023, 6:53 PMchrisjrn@chrisjrns-MacBook-Pro pants-sandbox-03GF3M % which node
/opt/homebrew/bin/node
chrisjrn@chrisjrns-MacBook-Pro pants-sandbox-03GF3M % /opt/homebrew/bin/node --version
v19.7.0
ancient-vegetable-10556
03/27/2023, 6:55 PMnode
on my systemancient-vegetable-10556
03/27/2023, 6:56 PMancient-vegetable-10556
03/27/2023, 6:56 PMworried-painter-31382
03/27/2023, 6:56 PMworried-painter-31382
03/27/2023, 6:56 PMancient-vegetable-10556
03/27/2023, 6:56 PMworried-painter-31382
03/27/2023, 6:57 PMancient-vegetable-10556
03/27/2023, 6:57 PMancient-vegetable-10556
03/27/2023, 6:59 PM/bin/bash
is ancient, and /usr/bin/bash
is not.ancient-vegetable-10556
03/27/2023, 7:01 PMPATH
is just /bin
and wherever the self-contained SDK manifests?worried-painter-31382
03/27/2023, 7:01 PMancient-vegetable-10556
03/27/2023, 7:03 PMBinaryShimsRequest
to get bash
etc on the PATH
rather than using /bin
ancient-vegetable-10556
03/27/2023, 7:03 PMbash
worried-painter-31382
03/27/2023, 7:03 PMsh
as well, just a heads upancient-vegetable-10556
03/27/2023, 7:04 PM"PATH": f"/usr/bin:/bin:{self.binary_directory}",
doesnāt change the output afaictworried-painter-31382
03/27/2023, 7:08 PMPANTS_NODEJS_KNOWN_VERSIONS
to nothing and set the version to your local install, it should find any node you have on PATH, which I guess should work if the hypothesis is what I think it isworried-painter-31382
03/27/2023, 7:09 PMancient-vegetable-10556
03/27/2023, 7:10 PMversion, platform, sha256, filesize = [x.strip() for x in version_str.split(ā|ā)]
ValueError: not enough values to unpack (expected 4, got 1)
ancient-vegetable-10556
03/27/2023, 7:11 PMancient-vegetable-10556
03/27/2023, 7:11 PMPANTS_NODEJS_VERSION=19.7.0
workedworried-painter-31382
03/27/2023, 7:11 PMworried-painter-31382
03/27/2023, 7:11 PMPANTS_NODEJS_KNOWN_VERSIONS
wouldn't match that, of courseworried-painter-31382
03/27/2023, 7:12 PMancient-vegetable-10556
03/27/2023, 7:12 PMworried-painter-31382
03/27/2023, 7:17 PMancient-vegetable-10556
03/27/2023, 7:18 PMancient-vegetable-10556
03/27/2023, 7:18 PMancient-vegetable-10556
03/27/2023, 7:18 PMarm64
, perhaps (annoyingly) this is relevantworried-painter-31382
03/27/2023, 7:28 PMapt
(ubuntu 22), which I guess is the closest equivalent we have here, and it is still well behaved on main
running
./pants --no-local-cache test src/python/pants/backend/javascript::
worried-painter-31382
03/27/2023, 7:29 PMwhich npm
/usr/bin/npmancient-vegetable-10556
03/27/2023, 7:29 PMancient-vegetable-10556
03/27/2023, 7:30 PMworried-painter-31382
03/27/2023, 7:30 PMancient-vegetable-10556
03/27/2023, 7:30 PMancient-vegetable-10556
03/27/2023, 7:31 PMancient-vegetable-10556
03/27/2023, 7:31 PMancient-vegetable-10556
03/27/2023, 7:31 PMancient-vegetable-10556
03/27/2023, 7:34 PMancient-vegetable-10556
03/27/2023, 7:52 PMworried-painter-31382
03/27/2023, 7:53 PMancient-vegetable-10556
03/27/2023, 7:54 PMancient-vegetable-10556
03/27/2023, 7:54 PMworried-painter-31382
03/27/2023, 7:54 PMworried-painter-31382
03/27/2023, 7:57 PMBinaryShim
comment is probably still relevant though I assume? Should I create an issue for that?witty-crayon-22786
03/27/2023, 7:57 PMancient-vegetable-10556
03/27/2023, 7:58 PMTheYeah, you should be explicitly putting binary dependencies on your path (possibly with version-matching tests if any binaries are particularly version-sensitive; POSIX tools arenāt)comment is probably still relevant though I assume? Should I create an issue for that? (edited)BinaryShim
worried-painter-31382
03/28/2023, 7:40 AM