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

Doesn't work with cwd #55

Open
rightaway opened this issue May 17, 2022 · 6 comments
Open

Doesn't work with cwd #55

rightaway opened this issue May 17, 2022 · 6 comments

Comments

@rightaway
Copy link

yarn --cwd dir outdated doesn't run the command from dir. You have to already be in dir or it says Outdated lockfile. Please run yarn install and try again. It should use cwd to be consistent with other yarn commands.

@mskelton
Copy link
Owner

Could you share a reproducible example? It's working for me with my testing.

@rightaway
Copy link
Author

It was caused by yarn 1 being set globally. With the right version it works.

@rightaway rightaway reopened this Mar 10, 2024
@rightaway
Copy link
Author

@mskelton Is it working in 4.1.1? You can't be in the directory when you test.

Usage Error: Couldn't find a script named "outdated".

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

@mskelton
Copy link
Owner

@rightaway The plugin is definitely working. More than likely you don't have it installed in the project you are trying to use it with.

@rightaway
Copy link
Author

I tried yarn --cwd /project outdated

/project/.yarnrc.yml has nodeLinker can you try it with that?

nodeLinker: node-modules
plugins:
  - checksum: 53df621960dbcb9cc3953b45376e0d7e0fbcb870eec71ebb8ffa575c2e834349fdcfa255c46b8fa3fff2c65f26e55c7339c2cb57ee80f92d62c9e181bcb7792d
    path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
    spec: "https://mskelton.dev/yarn-outdated/v4"

/project/.yarn/plugins/@yarnpkg/plugin-outdated.cjs has sha 512 that matches checksum in .yarnrc.

I think I installed it correctly is there anything else I need to do?

@mskelton
Copy link
Owner

@rightaway This feels like a Yarn issue. Can you cd into the /project directory and run yarn outdated? If that works, it's definitely a Yarn issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants