Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The patch file seens like have some problems. #9498

Closed
eric1023456 opened this issue Jul 6, 2021 · 10 comments
Closed

The patch file seens like have some problems. #9498

eric1023456 opened this issue Jul 6, 2021 · 10 comments

Comments

@eric1023456
Copy link

When we run the command "npm install", it install all needed modules automatically. But when it goes run patch-package, it display Failed to apply patch for package react-native.
ERROR Failed to apply patch for package react-native

This happened because the patch file patches\react-native+0.61.5-jitsi.2.patch could not be parsed.

If you just upgraded patch-package, you can try running:

cd patches\react-native+0.61.5-jitsi.2.patc
patch -p1 -i h
npx patch-package react-native
cd ../..

Otherwise, try manually creating the patch file again.

If the problem persists, please submit a bug report:

https://github.com/ds300/patch-package/issues/new?title=Patch+file+parse+error&body=%3CPlease+attach+the+patch+file+in+question%3E

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jitsi-meet@0.0.0 postinstall: patch-package && jetify
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jitsi-meet@0.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I have no idea on whether some error on the patch file, could you share some your opinion for me? Thx a lot

@saghul
Copy link
Member

saghul commented Jul 6, 2021

Did you modify any dependency?

@eric1023456
Copy link
Author

Did you modify any dependency?
nope, only download the files and run npm install

@saghul
Copy link
Member

saghul commented Jul 6, 2021

What node and npm versions are you using?

@eric1023456
Copy link
Author

Hi, the npm versions which I am using is 6.14.10 and node is 14.15.4

@eric1023456
Copy link
Author

What node and npm versions are you using?

Hi, the npm versions which I am using is 6.14.10 and node is 14.15.4

@UserSty
Copy link

UserSty commented Aug 9, 2021

Hi, I have the same issue using Windows

node v16.6.1
npm v7.20.3

Have you any updates or fixes for that?

@saghul
Copy link
Member

saghul commented Aug 9, 2021

We currently only support Node 12 / npm 6. Windows is not a supported environment.

@saghul saghul closed this as completed Aug 9, 2021
@wxjv99
Copy link

wxjv99 commented Aug 19, 2021

You can go to {Project Root}\node_modules\patch-package\dist\patch\parse.js and modify it according to the method on this page(The line may be different).
When ds300/patch-package publish this modification and everything will work normally

@vyomGupta736
Copy link

You can go to {Project Root}\node_modules\patch-package\dist\patch\parse.js and modify it according to the method on this page(The line may be different).
When ds300/patch-package publish this modification and everything will work normally

It Worked for me. Thanks a lot:)

@ghost
Copy link

ghost commented Sep 26, 2021

You can go to {Project Root}\node_modules\patch-package\dist\patch\parse.js and modify it according to the method on this page(The line may be different).
When ds300/patch-package publish this modification and everything will work normally

Worked for me too on Windows with:

  • node: 12.15.0
  • npm: 7.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants