nathanhleung / install-peerdeps

💻 A command-line interface to install an NPM package and its peer dependencies automatically.
https://www.npmjs.com/package/install-peerdeps
MIT License
296 stars 20 forks source link

Installing with Yarn via `yarn dlx` or `npx` ends in success with no package.json updates or changes #249

Open gpoole opened 1 year ago

gpoole commented 1 year ago

When using Yarn v3 to install, the command doesn't seem to do anything. Running yarn dlx install-peerdeps -Y <package> seems to result it no change and a success message, and the same happens with npx install-peerdeps if you use the Yarn option.

Yarn now discourages yarn global add, so I think this is the preferred usage? If so that might be causing confusion? As noted https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb it does work to just use npx instead, but you have to explicitly say "don't use yarn" to install, which is counterintuitive if you are using Yarn for the project.

Not sure if it's related to https://github.com/nathanhleung/install-peerdeps/issues/11 but thought this issue might be useful for other Yarn users specifically.