You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(.venv) serenitydev@c774de47c447:~/bug_report$ pants run //serenity.middleware:js#generate-asyncapi
15:11:54.20 [INFO] Completed: Installing [email protected].
yarn run v1.22.10
error Couldn't find a package.json file in "/tmp/pants-sandbox-YWbbQa"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
if and only if the package.json is in a sub-directory in the monorepo; if at root next to pants.toml, it works.
See details below for fully reproducible test case.
Pants version
2.25.0.dev2 (also observed in 2.23.x)
OS
Ubuntu 22.04 as dev container hosted inside VS Code on MacOS 15.2 (ARM64)
Linux c774de47c447 6.10.14-linuxkit #1 SMP Fri Nov 29 17:22:03 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
If you put these three files in the same directory and run:
pants run //:js#generate-asyncapi
You'll get an error like this (expected -- bad run command):
(.venv) serenitydev@c774de47c447:~/bug_report$ pants run //:js#generate-asyncapi
yarn run v1.22.10
$ asyncapi generate model
/bin/sh: 1: asyncapi: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
but if you simply move BUILD and package.json into a sub-directory, it fails with the reported error:
(.venv) serenitydev@c774de47c447:~/bug_report$ mkdir serenity.middleware
(.venv) serenitydev@c774de47c447:~/bug_report$ mv BUILD package.json serenity.middleware/
(.venv) serenitydev@c774de47c447:~/bug_report$ pants run //serenity.middleware:js#generate-asyncapi
yarn run v1.22.10
error Couldn't find a package.json file in "/tmp/pants-sandbox-AcIIZR"info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
My expectation is that each sub-directory in a monorepo will be treated as a standalone module, and that package.json does not have to be globally available at root. For our project I can work around this -- we only have have module which requires NodeJS, and it's for installing a CLI code generation tool --but it seems out of step with the rest of Pants.
The text was updated successfully, but these errors were encountered:
Describe the bug
The
pants run
goal fails with:if and only if the
package.json
is in a sub-directory in the monorepo; if at root next topants.toml
, it works.See details below for fully reproducible test case.
Pants version
2.25.0.dev2 (also observed in 2.23.x)
OS
Ubuntu 22.04 as dev container hosted inside VS Code on MacOS 15.2 (ARM64)
Additional info
pants.toml
BUILD
package.json
If you put these three files in the same directory and run:
You'll get an error like this (expected -- bad run command):
but if you simply move
BUILD
andpackage.json
into a sub-directory, it fails with the reported error:My expectation is that each sub-directory in a monorepo will be treated as a standalone module, and that
package.json
does not have to be globally available at root. For our project I can work around this -- we only have have module which requires NodeJS, and it's for installing a CLI code generation tool --but it seems out of step with the rest of Pants.The text was updated successfully, but these errors were encountered: