**ERROR** Failed to apply patch for package react-native-receive-sharing-intent at path

Open
#545 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
nodejs, react-native, swift, typescript
Domain
tooling

Research direction

Download and inspect patch-package-test.zip, then reproduce the failure with npm install after removing node_modules/react-native-receive-sharing-intent/ios/ShareViewController.swift. Compare the successful and failing patch applications on Windows 11 with WSL2 and macOS Sequoia. Done means the patch applies successfully after the file is removed and npm install completes without the error.

Written by the indexing model from the issue text.

Description

A patch (patch-package 8.0.0) created to add a new file and modify an existing one generates an error on Windows 11, WSL2 (version: 2.3. 26.0) and Mac OS (Sequoia 15.1).

Attached is a small test project where the error occurs.

To reproduce the error:
npm install <- the patch works without node_modules folder
rm node_modules/react-native-receive-sharing-intent/ios/ShareViewController.swift
npm install <- the patch fails with "ERROR Failed to apply patch for package react-native-receive-sharing-intent at path"

removing the node_modules/react-native-receive-sharing-intent/ folder everything works correctly again.

patch-package-test.zip

Dominant language
TypeScript
Stars
11.2k
Forks
325
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ds300/patch-package

All issues in ds300/patch-package

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.