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

Monorepo package dev dependency binary used in GitHub actions workflow reported as unlisted #735

Open
with-heart opened this issue Jul 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@with-heart
Copy link

Reproduction url

https://stackblitz.com/edit/github-e9sos1?file=packages%2Fclient%2Fpackage.json

Description of the issue

When the binary of a dev dependency of a package in a monorepo is used in a GitHub actions workflow (using yarn --cwd), the binary is reported as unlisted.

packages/client/package.json:

  "scripts": {
    "svelte-check": "svelte-check --workspace test"
  },
  "devDependencies": {
    "svelte-check": "^3.2.0"
  },

.github/workflows/node.yml:

      - name: Svelte Check
        run: yarn --cwd packages/client svelte-check
        shell: bash

Output:

❯ yarn knip
yarn run v1.22.19
$ knip
Unlisted binaries (1)
svelte-check  .github/workflows/node.yml
error Command failed with exit code 1.

For reference, I ran into this issue as part of statelyai/xstate#4974. Planned workaround is to add .github/workflows/node.yml to ignore for now.

I would expect no error to be reported.

@with-heart with-heart added the bug Something isn't working label Jul 17, 2024
@webpro
Copy link
Collaborator

webpro commented Jul 19, 2024

Indeed, the issue is that Knip does not understand to assign dependencies to the workspaces in packages/client when using the --cwd packages/client argument.

Similar issue to #433. Unfortunately I'll answer this the same.

@with-heart
Copy link
Author

Not unfortunate, that's totally understandable! Do you think it'd be worth adding a note in the docs about this somewhere? I'd be happy to tackle that if so

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