Skip to content

[Bug?]: yarn dlx not working if yarn.lock is moved under .yarn folder #3504

@FezVrasta

Description

@FezVrasta

Self-service

  • I'd be willing to implement a fix

Describe the bug

Anytime I run yarn dlx I get the following error:

➤ YN0001: Error: ENOENT: no such file or directory, open '/private/var/folders/dm/r2yzz3ws2zxbpbmrg58q5mr00000gn/T/xfs-cf56aaca/dlx-69009/.yarn/yarn.lock'
➤ YN0000: Failed with errors in 3s 507ms

To reproduce

In my .yarnrc.yml I specified lockfileFilename: .yarn/yarn.lock and I think it's the reason why dlx is failing. If I move the yarn.lock file back to its original position and remove the configuration line it works again.

Environment

System:
    OS: macOS 11.4
    CPU: (4) x64 Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz
  Binaries:
    Node: 14.17.4 - /usr/local/bin/node
    Yarn: 3.0.2 - /usr/local/bin/yarn
    npm: 7.21.0 - /usr/local/bin/npm

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupholdedReal issues without formal reproductionworking as intendedThe current behavior is intended.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions