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

[Bug?]: yarn global command giving "No project found" error #4570

Closed
1 task
DrakaSAN opened this issue Jun 23, 2022 · 2 comments
Closed
1 task

[Bug?]: yarn global command giving "No project found" error #4570

DrakaSAN opened this issue Jun 23, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@DrakaSAN
Copy link

DrakaSAN commented Jun 23, 2022

Self-service

  • I'd be willing to implement a fix

Describe the bug

On Debian 10 (stable)

Installed yarn via corepack enable, whatever yarn global command launched ends with an Usage Error:

$ yarn --version
3.2.1

$ yarn global bin
Usage Error: No project found in /home/user

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
$ yarn global 
Usage Error: No project found in /home/user

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...

To reproduce

$ corepack enable
$ yarn global bin

Environment

System:
    OS: Linux 4.19 Debian GNU/Linux 10 (buster) 10 (buster)
    CPU: (4) x64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
  Binaries:
    Node: 16.13.1 - /tmp/xfs-5ffd854a/node
    Yarn: 3.2.1 - /tmp/xfs-5ffd854a/yarn

Additional context

I guess something is wrong in my environment, but as a newcomer to yarn I'm don't know where to look. This looks like the global command do not have its repository setup correctly, which if I knew where to look, I maybe could gather more info, but since even yarn global bin ends in error, I'm stuck.

Using corepack prepare doesn't seems to change anything

$ corepack prepare yarn@3.2.1 --activate
Preparing yarn@3.2.1 for immediate activation...
$ yarn global bin
Usage Error: No project found in /home/user

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
@DrakaSAN DrakaSAN added the bug Something isn't working label Jun 23, 2022
@DrakaSAN
Copy link
Author

Looks like yarn doesn't have global anymore which explain why this is failing

@arcanis
Copy link
Member

arcanis commented Jun 23, 2022

Indeed, it suggests yarn dlx instead, or to use npm for global binaries (Yarn now focuses exclusively on project management, not system management).

@arcanis arcanis closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2022
tsutterley added a commit to tsutterley/IS2view that referenced this issue Mar 15, 2023
tsutterley added a commit to tsutterley/IS2view that referenced this issue Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants