-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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: Couldn't find a package.json file #9011
Comments
Looks like this was introduced in the release this morning; 1.22.20 |
Facing the same issues ever since 1.22.20. |
for us what fixed it was removing a |
Confirming that this has also broken our pipeline due to |
Workaround for yarnpkg/yarn#9011
Here's a repro Dockerfile
Adding |
Workaround for yarnpkg/yarn#9011
I'm investigating. It seems the problem is triggered when calling Yarn through
Whereas this works:
|
If this helps I'm facing the same issue, commands (Node version v18.16.0, npm version 9.5.1, macOS Sonoma 14.1.1)
Result in
This was fixed by pinning the yarn version to 1.22.19 as mentioned by @PhilippMeissner |
I have identified a fix; I'm working on releasing it |
I released the 1.22.21 which should have fixed this; can one of you confirm me that it looks good on your side? |
I've confirmed this patch resolved my issue. |
Fixed for me as well, thank you for the prompt fix 👍 |
npm ls -g yarn
npm WARN config global
--global
,--local
are deprecated. Use--location=global
instead./opt/node/lib
└── [email protected]
yarn --help
Error: Couldn't find a package.json file in "/"
at MessageError.ExtendableBuiltin (/opt/node/lib/node_modules/yarn/lib/cli.js:721:66)
at new MessageError (/opt/node/lib/node_modules/yarn/lib/cli.js:750:123)
at /opt/node/lib/node_modules/yarn/lib/cli.js:41356:15
at Generator.next ()
at step (/opt/node/lib/node_modules/yarn/lib/cli.js:310:30)
at /opt/node/lib/node_modules/yarn/lib/cli.js:321:13
The text was updated successfully, but these errors were encountered: