ds300 / patch-package

Fix broken node modules instantly 🏃🏽‍♀️💨
MIT License
10.42k stars 294 forks source link

Does not support pnpm #413

Closed arobinson closed 2 years ago

arobinson commented 2 years ago
patch-package 6.4.7

**ERROR** No package-lock.json, npm-shrinkwrap.json, or yarn.lock file.

You must use either npm@>=5, yarn, or npm-shrinkwrap to manage this project's
dependencies.

pnpm does not use any of these files. It uses pnpm-lock.yaml

arobinson commented 2 years ago

I'm not sure it really should support it well. pnpm will hard-link these files, so if the package is patched, it is patched for the entire computer, not just the working copy. As a result the patch will affect the entire computer.

saihaj commented 2 years ago

latest version of pnpm has this built-in https://pnpm.io/cli/patch and for old versions I have used a community maintained for of this package https://www.npmjs.com/package/@milahu/patch-package

orta commented 2 years ago

Closing as this works well in pnpm natively 👍🏻 and we document this in the README