ds300 / patch-package

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

Repair package JSON does not take effect #396

Open wangjieCode opened 2 years ago

wangjieCode commented 2 years ago
patch-package 6.4.7
Applying patches...

**ERROR** Failed to apply patch for package version-compare at path

    node_modules/version-compare

  This error was caused because patch-package cannot apply the following patch file:

    patches/version-compare+1.4.0.patch

  Try removing node_modules and trying again. If that doesn't work, maybe there was
  an accidental change made to the patch file? Try recreating it by manually
  editing the appropriate files and running:

    patch-package version-compare

  If that doesn't work, then it's a bug in patch-package, so please submit a bug
  report. Thanks!

    https://github.com/ds300/patch-package/issues

---
patch-package finished with 1 error(s).
added 851 packages from 505 contributors in 9.039s

Recurrence warehouse https://github.com/wangjieCode/patch-package.git

alexhuszar commented 2 years ago

I have same issue any solution for this?

npm timing reify Completed in 3618ms

**ERROR** Failed to apply patch for package react-big-calendar at path

   node_modules/react-big-calendar

This error was caused because patch-package cannot apply the following patch file:

patches/react-big-calendar+0.40.1.patch

Try removing node_modules and trying again. If that doesn't work, maybe there was
an accidental change made to the patch file? Try recreating it by manually
editing the appropriate files and running:

patch-package react-big-calendar

If that doesn't work, then it's a bug in patch-package, so please submit a bug
report. Thanks!

 https://github.com/ds300/patch-package/issues

 ---
patch-package finished with 1 error(s).

react-big-calendar+0.40.1.patch.txt

alexhuszar commented 2 years ago
patch-package 6.4.7
Applying patches...

**ERROR** Failed to apply patch for package version-compare at path

    node_modules/version-compare

  This error was caused because patch-package cannot apply the following patch file:

    patches/version-compare+1.4.0.patch

  Try removing node_modules and trying again. If that doesn't work, maybe there was
  an accidental change made to the patch file? Try recreating it by manually
  editing the appropriate files and running:

    patch-package version-compare

  If that doesn't work, then it's a bug in patch-package, so please submit a bug
  report. Thanks!

    https://github.com/ds300/patch-package/issues

---
patch-package finished with 1 error(s).
added 851 packages from 505 contributors in 9.039s

Recurrence warehouse https://github.com/wangjieCode/patch-package.git

I found a solution. I modified the dist folder, not the lib folder files from the package and it worked!