Skip to content

[Bug?]: Can't add a dependency from a private github repo where the dep uses pnpm #4212

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

Closed
1 task
catsalive opened this issue Mar 11, 2022 · 2 comments
Closed
1 task
Labels
bug Something isn't working

Comments

@catsalive
Copy link

Self-service

  • I'd be willing to implement a fix

Describe the bug

Using yarn 3.2.0

Unable to install a dependency from a private github repo that itself uses pnpm as it's package manager. This worked fine in yarn 1.*.

command used: yarn add <package-name>@[email protected]:<org-name>/<package-name>.git#<branch-name>

As soon as I converted the dep package to yarn - it worked fine. I have to assume this is a bug.

Totally guessing, but in https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-core/sources/scriptUtils.ts
the PackageManager enum has pnpm in it. But later on in the code the workflows map variable has no entry for pnpm in it - which appears to be the issue and why it emits the error: Assertion failed: Unsupported workflow.

To reproduce

  • Create a Yarn Berry repo (3.2.0)
  • Try to yarn add a dependency from a private github repo which itself uses pnpm as it's package manager
  • Witness failure to import with Assertion failed: Unsupported workflow error

Environment

System:
    OS: Windows 10 10.0.19042
    CPU: (12) x64 Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
  Binaries:
    Node: 12.22.6 - ~\AppData\Local\Temp\xfs-b1a8c68b\node.CMD
    Yarn: 3.2.0 - ~\AppData\Local\Temp\xfs-b1a8c68b\yarn.CMD
    npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD

Additional context

No response

@catsalive catsalive added the bug Something isn't working label Mar 11, 2022
@merceyz
Copy link
Member

merceyz commented Mar 11, 2022

Duplicate of #3169

@merceyz merceyz marked this as a duplicate of #3169 Mar 11, 2022
@merceyz merceyz closed this as completed Mar 11, 2022
@catsalive
Copy link
Author

Duplicate of #3169

Gotcha! Sorry for the dupe.

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