patch-package
patch-package copied to clipboard
Can't patch package- fails with status 1, no error
Hi I'm still getting the below error even though it was allegedly fixed in an earlier version:
C:\TMAX-R\trunk\lucid_client>npx patch-package @inovua/reactdatagrid-enterprise
npm WARN config global --global, --local are deprecated. Use --location=global instead.
patch-package 8.0.0
• Creating temporary folder
• Installing @inovua/[email protected] with npm
{
status: 1,
signal: null,
output: [ null, null, null ],
pid: 24900,
stdout: null,
stderr: null,
error: null
}
C:\TMAX-R\trunk\lucid_client\node_modules\patch-package\dist\makePatch.js:395 throw e; ^ { status: 1, signal: null, output: [ null, null, null ], pid: 24900, stdout: null, stderr: null, error: null }
Same issue:
npx patch-package snabbdom
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 ... 142 more bytes>,
<Buffer >
],
pid: 77815,
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 ... 142 more bytes>,
stderr: <Buffer >,
error: null
}
/Users/quolpr/.npm/_npx/1a782c0cdc01f9d4/node_modules/patch-package/dist/makePatch.js:395
throw e;
^
{
status: 1,
signal: null,
output: [
null,
Buffer(192) [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,
... 92 more items
],
Buffer(0) [Uint8Array] []
],
pid: 77815,
stdout: Buffer(192) [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,
... 92 more items
],
stderr: Buffer(0) [Uint8Array] [],
error: null
}
Same
This happened to me when the registry listed in my package-lock.json didn't match the registry in my .npmrc.
This has been happening to me as well all of a sudden
Edit: Using npx patch-package instead of just patch-package fixed the issue.
I still get the problem using npx patch-package. We're using a private registry as well, so could be related.
Edit: when I added proper private registry configuration to my ~/.npmrc then the command worked. Previously I only had the configuration in the repo itself, and when patch-package installs the dependency in a temporary directory it seems it didn't pick up that up.
I had the same problem, even when using npx patch-package. what solved it for me was to switch from node v21.6.2
to version to 17.7.2.
Neither downgrading node nor .npmrc configurations fixed this error for me.
Neither downgrading node nor
.npmrcconfigurations fixed this error for me.
same here. i tried downgrading yarn ( from berry to yarn 1) but doesn't work either
after a few tries, what worked for me was to downgrade yarn (from berry to yarn 1) AND to downgrade node version to 17 (16 and 20 don't work for some reason). Hopefully the team can get it to work with node 20. Thanks