Open irobles25 opened 3 years ago
1.Delete package react-native; 2.Install package react-native; 3.npm run patch-package
What npm version do you have? I am experiencing issues with npm 7.20.0, but not versions before that.
I'm having this same issue with node 16 and npm 7.21 on netlify's build runners, under ubuntu xenial
updating the netlify runner to ubuntu focal fixed it
Same error, no one has found a solution yet?
I was able to fix this doing the next steps:
generate-specs.sh
filenode_modules/react-native/scripts/find-node.sh
like it was suggested here https://github.com/react-native-community/upgrade-support/issues/138#issuecomment-806831612 react-native-cli
from my package.json fileAfter that the issue was fixed
My working environment is: MacOS Big Sur 11.4 Node 12.15.0 React Native 0.64.2 NPM 6.13.4
I don't know if anyone still looks up for this issue.
My issue was the difference of resolved version
in yarn.lock.
I had a different package.json
versions in my case, and i copied the code and it didn't work because the yarn.lock was already generated.
I just copied over the old yarn file and it worked perfectly.
For instance this was causing the error and i changed it to match the exact version
I've created right patch using diff
, I can apply it using patch -p1
, but I can't apply it using patch-package
and there is no reason why it fails. It looks like I need to move away from patch-package
, I have no time to dig it, sorry.
PS
"postinstall": "git apply patches/*",
I make a downgrade
"patch-package": "^5.0.0",
I deleted node_modules folder and it solved this particular problem of patches
I make a downgrade
"patch-package": "^5.0.0",
worked for me
In my case it was a cache issue produced by actions/cache
. Along with the changes in patches I had to bump yarn.lock
so the cache would be invalidated.
I'm currently migrating my react native version from 0.63.4 to 0.64.2 I'm running:
I added some patches for multiple files but including a patch for the
generate-specs.sh
file from react-native, I'm able to generate it successfully runningyarn patch-package react-native
but after a fresh dependencies install (like removing the node_modules) and install them again from scratch, the patch fails showing*ERROR** Failed to apply patch for package react-native at path
does someone know how could I fix this issue? this is only happening for the react-native patch, I don't have issues with the others that I have and where generated in the same wayMy patch looks like this: