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

Uniterpretable Error during makePatch #510

Open
kumavis opened this issue Feb 8, 2024 · 11 comments
Open

Uniterpretable Error during makePatch #510

kumavis opened this issue Feb 8, 2024 · 11 comments

Comments

@kumavis
Copy link

kumavis commented Feb 8, 2024

voxel-lerna on  three-upgrade [$!?] via  v20.11.0 
❯ yarn patch-package vkey
patch-package 8.0.0
• Creating temporary folder
• Installing [email protected] with yarn

{
  status: 1,
  signal: null,
  output: [
    null,
    <Buffer 1b 5b 33 31 6d 1b 5b 31 6d 55 6e 6b 6e 6f 77 6e 20 53 79 6e 74 61 78 20 45 72 72 6f 72 1b 5b 32 32 6d 1b 5b 33 39 6d 3a 20 55 6e 73 75 70 70 6f 72 74 ... 185 more bytes>,
    <Buffer >
  ],
  pid: 463708,
  stdout: <Buffer 1b 5b 33 31 6d 1b 5b 31 6d 55 6e 6b 6e 6f 77 6e 20 53 79 6e 74 61 78 20 45 72 72 6f 72 1b 5b 32 32 6d 1b 5b 33 39 6d 3a 20 55 6e 73 75 70 70 6f 72 74 ... 185 more bytes>,
  stderr: <Buffer >,
  error: null
}

/home/xyz/Development/voxel-lerna/node_modules/patch-package/dist/makePatch.js:395
        throw e;
        ^
{
  status: 1,
  signal: null,
  output: [
    null,
    Buffer(235) [Uint8Array] [
       27,  91,  51,  49, 109,  27,  91,  49, 109,  85, 110, 107,
      110, 111, 119, 110,  32,  83, 121, 110, 116,  97, 120,  32,
       69, 114, 114, 111, 114,  27,  91,  50,  50, 109,  27,  91,
       51,  57, 109,  58,  32,  85, 110, 115, 117, 112, 112, 111,
      114, 116, 101, 100,  32, 111, 112, 116, 105, 111, 110,  32,
      110,  97, 109, 101,  32,  40,  34,  45,  45, 105, 103, 110,
      111, 114, 101,  45, 115,  99, 114, 105, 112, 116, 115,  34,
       41,  46,  10,  10,  36,  32, 121,  97, 114, 110,  32, 105,
      110, 115, 116,  97,
      ... 135 more items
    ],
    Buffer(0) [Uint8Array] []
  ],
  pid: 463708,
  stdout: Buffer(235) [Uint8Array] [
     27,  91,  51,  49, 109,  27,  91,  49, 109,  85, 110, 107,
    110, 111, 119, 110,  32,  83, 121, 110, 116,  97, 120,  32,
     69, 114, 114, 111, 114,  27,  91,  50,  50, 109,  27,  91,
     51,  57, 109,  58,  32,  85, 110, 115, 117, 112, 112, 111,
    114, 116, 101, 100,  32, 111, 112, 116, 105, 111, 110,  32,
    110,  97, 109, 101,  32,  40,  34,  45,  45, 105, 103, 110,
    111, 114, 101,  45, 115,  99, 114, 105, 112, 116, 115,  34,
     41,  46,  10,  10,  36,  32, 121,  97, 114, 110,  32, 105,
    110, 115, 116,  97,
    ... 135 more items
  ],
  stderr: Buffer(0) [Uint8Array] [],
  error: null
}

Node.js v20.11.0

@virginiab10
Copy link

I'm having the same issue

@gvillenave
Copy link

Same issue here, any updates?

@duncannz
Copy link

Same issue here, we are no longer able to update any patches

@farfromrefug
Copy link

@duncannz @gvillenave @kumavis @virginiab10 the issue is that patch-package does not support newest versions of yarn.
Especially those 2 lines https://github.com/ds300/patch-package/blob/master/src/makePatch.ts#L211 and https://github.com/ds300/patch-package/blob/master/src/makePatch.ts#L220 are failing because newest yarn does not support "--ignore-engines" and. "--ignore-scripts".
I managed to fix it locally by removing the trycatch and only run install. But that might not be the perfect fix. Someone would need to look at it deeper

@williamAstudillo
Copy link

From readme file , "yarn 2+ have native support for patching dependencies via yarn patch. You do not need to use patch-package on these projects."

@nateshmbhat
Copy link

facing same issue

@horaczech
Copy link

horaczech commented Jul 31, 2024

Downgrade yarn to v1 (e.g. 1.22.22) with yarn set version 1.22.22. v2 and 3 are not compatible. If errors while downgrading: https://stackoverflow.com/a/63798039/16787761
edit: better call the downgrade command from ~/

@MaskoMasko
Copy link

MaskoMasko commented Aug 16, 2024

I had to downgrade yarn to v1 and also delete .yarnrc.yml file. Without deleting .yarnrc.yml file, my yarn version wouldn't correctly set to downgraded version. Also if you have .yarnrc.yml in ur react native project, you can change the versions manually.

@cdavie-artium
Copy link

I'm seeing the same problem, but with npm, not yarn.

@cdavie-artium
Copy link

I did some digging and got patch-package to print out more details about the error:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://pkgs.dev.azure.com/@vitest/coverage-v8/-/coverage-v8-1.6.0.tgz
npm ERR! 404
npm ERR! 404  '@vitest/coverage-v8@https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.6.0.tgz' is not in this registry.

I was able to fix the problem by manually running npm install --save-dev @vitest/coverage-v8, re-implementing my changes to it, and re-running npx patch-package @vitest/coverage-v8 again.

The file contents were identical, so there must have been some metadata cached that broke patch-package's ability to create a patch?

@ucheNkadiCode
Copy link

For issues to do with makePatch -> this solution worked for me. It's been a problem since 2021

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