patch-package
patch-package copied to clipboard
8.0.0 seems to fail when modifying the folder structure of a library on `postinstall`
As in the title, it seems that the latest version (8.0.0) fails on a package during postinstall but not when re-running patch-package.
I did some investigations and it seems that it's only caused when renaming the folder of a library. Here are the steps to reproduce it:
- Rename a sub-folder of a library
- Modify content of a file inside that newly renamed folder
- Create patch file
- Remove
node_modules npm iwithpatch-packagein postinstall- Notice error
For now, I will be reverting to 7.0.0 as the issue doesn't seem to occur there.
Same, but mine was failing every time. I was trying to apply this patch for rn-secure-storage and with 8.0.0 I'm getting an error:
patch-package 8.0.0
Applying patches...
**ERROR** Failed to apply patch for package rn-secure-storage at path
node_modules/rn-secure-storage
This error was caused because patch-package cannot apply the following patch file:
patches/rn-secure-storage+2.0.8.patch
[...]
The patch basically removes the file rn-secure-storage/iOS/RNSecureStorage.podspec and then "re-create" the file inside the root folder rn-secure-storage/RNSecureStorage.podspec, with some internal changes.
With version 7.0.2 of patch-package this is not happening. I'm on Mac M2, Node 16, using yarn.