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

Unhelpfull error #553

Open
Evanion opened this issue Jan 17, 2025 · 4 comments
Open

Unhelpfull error #553

Evanion opened this issue Jan 17, 2025 · 4 comments

Comments

@Evanion
Copy link

Evanion commented Jan 17, 2025

Hello
I have tried in both pwsh and bash on windows 11 to create a patch, but I get a cryptic error that doesn't really give me any info on why it failed.

 npx patch-package @remix-run/dev
patch-package 8.0.0
• Creating temporary folder
• Installing @remix-run/[email protected] with npm
{
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 42836,
  stdout: null,
  stderr: null,
  error: null
}

C:\dev\LHB.Frontend\node_modules\patch-package\dist\makePatch.js:395
        throw e;
        ^
{
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 42836,
  stdout: null,
  stderr: null,
  error: null
}

Node.js v20.12.2

I have used the tool as late as last week in this repo, so I don't understand why this fails.
Any ideas on how I can futher debug this?

@irodeanu
Copy link

Same error

@jeanparpaillon
Copy link

👍

@carsonxw
Copy link

carsonxw commented Jan 25, 2025

Same here, started happening a week ago

@mikehardy
Copy link
Contributor

mikehardy commented Feb 3, 2025

This is an artifact of using new yarn versions while patch-package doesn't support for them for patch-generation.

There are PRs that will fix this, however you need it to work now right? I did.

So patch-package can patch just fine with new yarn versions but it cannot generate patches with new yarn versions.

Solution: use npm just for patch generation, add the --use-npm flag at the end

npx patch-package <broken package name here> --use-npm

Edit: I swear that worked one time, but it did not work a second time.

But what did work was temporarily doing a yarn set version 1.22.20 then npx patch-package <busted package> and then reverting the yarn version change 🤷

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