yarn-plugin-outdated icon indicating copy to clipboard operation
yarn-plugin-outdated copied to clipboard

Doesn't work with cwd

Open rightaway opened this issue 2 years ago • 6 comments

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.

rightaway avatar May 17 '22 06:05 rightaway

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

mskelton avatar May 18 '22 17:05 mskelton

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

rightaway avatar May 20 '22 08:05 rightaway

@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> ...

rightaway avatar Mar 10 '24 07:03 rightaway

@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.

mskelton avatar Mar 10 '24 14:03 mskelton

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?

rightaway avatar Mar 10 '24 17:03 rightaway

@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.

mskelton avatar Mar 20 '24 02:03 mskelton

Closing due to lack of response

mskelton avatar Jul 02 '24 19:07 mskelton