forked from ds300/patch-package
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
yarn add [email protected]
patch-package jest-snapshot
error Couldn't find any versions for "jest-snapshot" that matches "26.6.2, jest-snapshot@npm:^26.6.2"
this is in a monorepo (mitosis)
where i install [email protected] in packages/core
grep jest-snapshot package.json
"jest-snapshot": "26.6.2",
grep version node_modules/jest-snapshot/package.json
"version": "26.6.2",
grep jest-snapshot yarn.lock
jest-snapshot: 26.6.2
jest-snapshot: ^24.9.0
jest-snapshot: ^26.6.2
jest-snapshot: ^27.5.1
jest-snapshot: ^27.5.1
jest-snapshot: ^24.9.0
jest-snapshot: ^26.6.2
jest-snapshot: ^27.5.1
jest-snapshot: ^24.9.0
jest-snapshot: ^26.6.2
jest-snapshot: ^27.5.1
jest-snapshot: ^24.9.0
jest-snapshot: ^26.6.2
jest-snapshot: ^27.5.1
"jest-snapshot@npm:26.6.2, jest-snapshot@npm:^26.6.2":
resolution: "jest-snapshot@npm:26.6.2"
"jest-snapshot@npm:^24.9.0":
resolution: "jest-snapshot@npm:24.9.0"
"jest-snapshot@npm:^27.0.2, jest-snapshot@npm:^27.5.1":
resolution: "jest-snapshot@npm:27.5.1"
jest-snapshot: ^27.0.2
yarn --version
3.2.0
upstream says i should use yarn patch
but i dont like it
yarn 2+ have native support for patching dependencies via yarn patch. You do not need to use patch-package on these projects.
yarn/lib/cli.js
couldntFindVersionThatMatchesRange: "Couldn't find any versions for $0 that matches $1",
var satisfied = yield config.resolveConstraints((0, (_keys || _load_keys()).default)(body.versions), range);
if (satisfied) {
return body.versions[satisfied];
} else if (request && !config.nonInteractive) {
// ...
}
throw new (_errors || _load_errors()).MessageError(config.reporter.lang('couldntFindVersionThatMatchesRange', body.name, range));
the output from child_process
is binary (Uint8Array)
cos we dont set { encoding: "utf8" }
ds300#432
patch-package jest-snapshot
patch-package 6.5.0
• Creating temporary folder
• Installing [email protected] with yarn
warning package.json: No license field
warning No license field
error Couldn't find any versions for "jest-snapshot" that matches "26.6.2, jest-snapshot@npm:^26.6.2"
{
status: 1,
signal: null,
output: [
null,
<Buffer 79 61 72 6e 20 69 6e 73 74 61 6c 6c 20 76 31 2e 32 32 2e 31 39 0a 69 6e 66 6f 20 4e 6f 20 6c 6f 63 6b 66 69 6c 65 20 66 6f 75 6e 64 2e 0a 5b 31 2f 34 ... 113 more bytes>,
<Buffer 77 61 72 6e 69 6e 67 20 70 61 63 6b 61 67 65 2e 6a 73 6f 6e 3a 20 4e 6f 20 6c 69 63 65 6e 73 65 20 66 69 65 6c 64 0a 77 61 72 6e 69 6e 67 20 4e 6f 20 ... 116 more bytes>
],
pid: 2418758,
stdout: <Buffer 79 61 72 6e 20 69 6e 73 74 61 6c 6c 20 76 31 2e 32 32 2e 31 39 0a 69 6e 66 6f 20 4e 6f 20 6c 6f 63 6b 66 69 6c 65 20 66 6f 75 6e 64 2e 0a 5b 31 2f 34 ... 113 more bytes>,
stderr: <Buffer 77 61 72 6e 69 6e 67 20 70 61 63 6b 61 67 65 2e 6a 73 6f 6e 3a 20 4e 6f 20 6c 69 63 65 6e 73 65 20 66 69 65 6c 64 0a 77 61 72 6e 69 6e 67 20 4e 6f 20 ... 116 more bytes>,
error: null
}
/home/user/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/patch-package/dist/makePatch.js:218
throw e;
^
{
status: 1,
signal: null,
output: [
null,
Buffer(163) [Uint8Array] [
121, 97, 114, 110, 32, 105, 110, 115, 116, 97, 108, 108,
32, 118, 49, 46, 50, 50, 46, 49, 57, 10, 105, 110,
102, 111, 32, 78, 111, 32, 108, 111, 99, 107, 102, 105,
108, 101, 32, 102, 111, 117, 110, 100, 46, 10, 91, 49,
47, 52, 93, 32, 82, 101, 115, 111, 108, 118, 105, 110,
103, 32, 112, 97, 99, 107, 97, 103, 101, 115, 46, 46,
46, 10, 105, 110, 102, 111, 32, 86, 105, 115, 105, 116,
32, 104, 116, 116, 112, 115, 58, 47, 47, 121, 97, 114,
110, 112, 107, 103,
... 63 more items
],
Buffer(166) [Uint8Array] [
119, 97, 114, 110, 105, 110, 103, 32, 112, 97, 99, 107,
97, 103, 101, 46, 106, 115, 111, 110, 58, 32, 78, 111,
32, 108, 105, 99, 101, 110, 115, 101, 32, 102, 105, 101,
108, 100, 10, 119, 97, 114, 110, 105, 110, 103, 32, 78,
111, 32, 108, 105, 99, 101, 110, 115, 101, 32, 102, 105,
101, 108, 100, 10, 101, 114, 114, 111, 114, 32, 67, 111,
117, 108, 100, 110, 39, 116, 32, 102, 105, 110, 100, 32,
97, 110, 121, 32, 118, 101, 114, 115, 105, 111, 110, 115,
32, 102, 111, 114,
... 66 more items
]
],
pid: 2418758,
stdout: Buffer(163) [Uint8Array] [
121, 97, 114, 110, 32, 105, 110, 115, 116, 97, 108, 108,
32, 118, 49, 46, 50, 50, 46, 49, 57, 10, 105, 110,
102, 111, 32, 78, 111, 32, 108, 111, 99, 107, 102, 105,
108, 101, 32, 102, 111, 117, 110, 100, 46, 10, 91, 49,
47, 52, 93, 32, 82, 101, 115, 111, 108, 118, 105, 110,
103, 32, 112, 97, 99, 107, 97, 103, 101, 115, 46, 46,
46, 10, 105, 110, 102, 111, 32, 86, 105, 115, 105, 116,
32, 104, 116, 116, 112, 115, 58, 47, 47, 121, 97, 114,
110, 112, 107, 103,
... 63 more items
],
stderr: Buffer(166) [Uint8Array] [
119, 97, 114, 110, 105, 110, 103, 32, 112, 97, 99, 107,
97, 103, 101, 46, 106, 115, 111, 110, 58, 32, 78, 111,
32, 108, 105, 99, 101, 110, 115, 101, 32, 102, 105, 101,
108, 100, 10, 119, 97, 114, 110, 105, 110, 103, 32, 78,
111, 32, 108, 105, 99, 101, 110, 115, 101, 32, 102, 105,
101, 108, 100, 10, 101, 114, 114, 111, 114, 32, 67, 111,
117, 108, 100, 110, 39, 116, 32, 102, 105, 110, 100, 32,
97, 110, 121, 32, 118, 101, 114, 115, 105, 111, 110, 115,
32, 102, 111, 114,
... 66 more items
],
error: null
}
Node.js v18.9.1
Metadata
Metadata
Assignees
Labels
No labels