Berry: [Bug] Cannot install fsevents - Cannot apply hunk #1

Created on 21 Jan 2020  ·  21Comments  ·  Source: yarnpkg/berry

  • [ ] I'd be willing to implement a fix

Describe the bug

Some package requires fsevents to be fetched, but it fails.

➤ YN0000: ┌ Fetch step
➤ YN0013: │ fsevents@patch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e can't be found in the cache and will be fetched from the disk
➤ YN0001: │ Error: fsevents@patch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e: Cannot apply hunk #1
    at c (...\yarn\bin\yarn.js:111:195461)
    at process._tickCallback (internal/process/next_tick.js:68:7)
➤ YN0000: └ Completed in 1.24s
➤ YN0000: Failed with errors in 8.69s

To Reproduce

js repro await expect(packageJsonAndInstall({ dependencies: { [`fsevents`]: `2.0.7` } })).resolves.toBeTruthy();

Environment if relevant (please complete the following information):

  • OS: Windows 10 (build 18362.592)
  • Node 10.16.0
  • Yarn 2.0.0-rc.24

Additional context

I suspect that this error may be related to PR https://github.com/yarnpkg/berry/pull/692

bug reproducible

Most helpful comment

Upgrading yarn to the version on master works for me

# fail with fsevents: cannot apply hunk
yarn set version berry
yarn add jest

# success
yarn set version from sources
yarn add jest

All 21 comments

The reproduction case in your issue seems broken (ie it neither pass nor fail due to throwing an unmanaged exception):

Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js install

➤ YN0000: ┌ Resolution step
➤ YN0032: │ fsevents@npm:2.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ fsevents@npm:2.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0000: └ Completed in 2.39s
➤ YN0000: ┌ Fetch step
➤ YN0013: │ aproba@npm:1.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ are-we-there-yet@npm:1.1.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ abbrev@npm:1.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ ajv@npm:6.11.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ ansi-regex@npm:2.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ asn1@npm:0.2.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ assert-plus@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ asynckit@npm:0.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ aws-sign2@npm:0.7.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ aws4@npm:1.9.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ balanced-match@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ bcrypt-pbkdf@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ brace-expansion@npm:1.1.11 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ caseless@npm:0.12.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ chownr@npm:1.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ code-point-at@npm:1.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ combined-stream@npm:1.0.8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ concat-map@npm:0.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ console-control-strings@npm:1.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ core-util-is@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ dashdash@npm:1.14.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ delayed-stream@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ delegates@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ ecc-jsbn@npm:0.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ env-paths@npm:2.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ extend@npm:3.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ extsprintf@npm:1.3.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fast-deep-equal@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fast-json-stable-stringify@npm:2.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ forever-agent@npm:0.6.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ form-data@npm:2.3.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fs-minipass@npm:1.2.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fs.realpath@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fsevents@npm:2.0.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fsevents@patch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e can't be found in the cache and will be fetched from the disk
➤ YN0013: │ gauge@npm:2.7.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ getpass@npm:0.1.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ glob@npm:7.1.6 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ graceful-fs@npm:4.2.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error: fsevents@patch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e: Cannot apply hunk #1
    at applyPatch (/github/workspace/packages/plugin-patch/sources/tools/apply.ts:182:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at /github/workspace/packages/plugin-patch/sources/tools/apply.ts:80:11
    at preserveTime (/github/workspace/packages/plugin-patch/sources/tools/apply.ts:11:18)
    at Object.applyPatchFile (/github/workspace/packages/plugin-patch/sources/tools/apply.ts:79:9)
    at PatchFetcher.patchPackage (/github/workspace/packages/plugin-patch/sources/PatchFetcher.ts:65:9)
    at /github/workspace/packages/plugin-patch/sources/PatchFetcher.ts:28:16
    at loadPackageThroughMirror (/github/workspace/packages/yarnpkg-core/sources/Cache.ts:148:16)
    at /github/workspace/packages/yarnpkg-core/sources/Cache.ts:163:25
➤ YN0013: │ har-schema@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ har-validator@npm:5.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ has-unicode@npm:2.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ http-signature@npm:1.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ inflight@npm:1.0.6 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ inherits@npm:2.0.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ is-fullwidth-code-point@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ is-typedarray@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ isarray@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ isexe@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ isstream@npm:0.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ jsbn@npm:0.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ json-schema-traverse@npm:0.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ json-schema@npm:0.2.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ json-stringify-safe@npm:5.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ jsprim@npm:1.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ mime-db@npm:1.43.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ mime-types@npm:2.1.26 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minimatch@npm:3.0.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minimist@npm:0.0.8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minipass@npm:2.9.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minizlib@npm:1.3.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ mkdirp@npm:0.5.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ node-gyp@npm:6.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ nopt@npm:4.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ npmlog@npm:4.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ number-is-nan@npm:1.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ oauth-sign@npm:0.9.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ object-assign@npm:4.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ once@npm:1.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ os-homedir@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ os-tmpdir@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ osenv@npm:0.1.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ path-is-absolute@npm:1.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ performance-now@npm:2.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ process-nextick-args@npm:2.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ psl@npm:1.7.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ punycode@npm:1.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ punycode@npm:2.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ qs@npm:6.5.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ readable-stream@npm:2.3.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ request@npm:2.88.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ rimraf@npm:2.7.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ safe-buffer@npm:5.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ safe-buffer@npm:5.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ safer-buffer@npm:2.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ semver@npm:5.7.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ set-blocking@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ signal-exit@npm:3.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ sshpk@npm:1.16.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ string-width@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ string_decoder@npm:1.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ strip-ansi@npm:3.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tar@npm:4.4.13 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tough-cookie@npm:2.4.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tunnel-agent@npm:0.6.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tweetnacl@npm:0.14.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ uri-js@npm:4.2.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ util-deprecate@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ uuid@npm:3.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ verror@npm:1.10.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ which@npm:1.3.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ wide-align@npm:1.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ wrappy@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yallist@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 3.11s
➤ YN0000: Failed with errors in 5.5s

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

Remember: any non-Jest exceptions will cause the test to be reported as broken. If you expect something to pass without throwing, you must wrap it into something like await expect(...).resolves.toBeTruthy(). If you instead expect something to throw, you need to wrap it into await expect(...).rejects.toThrow().

The reproduction case in your issue seems broken (ie it neither pass nor fail due to throwing an unmanaged exception):

Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js install

➤ YN0000: ┌ Resolution step
➤ YN0032: │ fsevents@npm:2.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ fsevents@npm:2.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0000: └ Completed in 2.16s
➤ YN0000: ┌ Fetch step
➤ YN0013: │ aproba@npm:1.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ are-we-there-yet@npm:1.1.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ abbrev@npm:1.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ ajv@npm:6.11.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ ansi-regex@npm:2.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ asn1@npm:0.2.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ assert-plus@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ asynckit@npm:0.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ aws-sign2@npm:0.7.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ aws4@npm:1.9.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ balanced-match@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ bcrypt-pbkdf@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ brace-expansion@npm:1.1.11 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ caseless@npm:0.12.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ chownr@npm:1.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ code-point-at@npm:1.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ combined-stream@npm:1.0.8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ concat-map@npm:0.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ console-control-strings@npm:1.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ core-util-is@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ dashdash@npm:1.14.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ delayed-stream@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ delegates@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ ecc-jsbn@npm:0.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ env-paths@npm:2.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ extend@npm:3.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ extsprintf@npm:1.3.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fast-deep-equal@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fast-json-stable-stringify@npm:2.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ forever-agent@npm:0.6.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ form-data@npm:2.3.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fs-minipass@npm:1.2.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fs.realpath@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fsevents@npm:2.0.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fsevents@patch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e can't be found in the cache and will be fetched from the disk
➤ YN0013: │ gauge@npm:2.7.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ getpass@npm:0.1.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ glob@npm:7.1.6 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error: fsevents@patch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e: Cannot apply hunk #1
    at applyPatch (/github/workspace/packages/plugin-patch/sources/tools/apply.ts:182:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at /github/workspace/packages/plugin-patch/sources/tools/apply.ts:80:11
    at preserveTime (/github/workspace/packages/plugin-patch/sources/tools/apply.ts:11:18)
    at Object.applyPatchFile (/github/workspace/packages/plugin-patch/sources/tools/apply.ts:79:9)
    at PatchFetcher.patchPackage (/github/workspace/packages/plugin-patch/sources/PatchFetcher.ts:65:9)
    at /github/workspace/packages/plugin-patch/sources/PatchFetcher.ts:28:16
    at loadPackageThroughMirror (/github/workspace/packages/yarnpkg-core/sources/Cache.ts:148:16)
    at /github/workspace/packages/yarnpkg-core/sources/Cache.ts:163:25
➤ YN0013: │ graceful-fs@npm:4.2.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ har-schema@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ har-validator@npm:5.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ has-unicode@npm:2.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ http-signature@npm:1.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ inflight@npm:1.0.6 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ inherits@npm:2.0.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ is-fullwidth-code-point@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ is-typedarray@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ isarray@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ isexe@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ isstream@npm:0.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ jsbn@npm:0.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ json-schema-traverse@npm:0.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ json-schema@npm:0.2.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ json-stringify-safe@npm:5.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ jsprim@npm:1.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ mime-db@npm:1.43.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ mime-types@npm:2.1.26 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minimatch@npm:3.0.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minimist@npm:0.0.8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minipass@npm:2.9.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minizlib@npm:1.3.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ mkdirp@npm:0.5.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ node-gyp@npm:6.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ nopt@npm:4.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ npmlog@npm:4.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ number-is-nan@npm:1.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ oauth-sign@npm:0.9.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ object-assign@npm:4.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ once@npm:1.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ os-homedir@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ os-tmpdir@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ osenv@npm:0.1.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ path-is-absolute@npm:1.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ performance-now@npm:2.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ process-nextick-args@npm:2.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ psl@npm:1.7.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ punycode@npm:1.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ punycode@npm:2.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ qs@npm:6.5.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ readable-stream@npm:2.3.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ request@npm:2.88.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ rimraf@npm:2.7.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ safe-buffer@npm:5.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ safe-buffer@npm:5.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ safer-buffer@npm:2.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ semver@npm:5.7.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ set-blocking@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ signal-exit@npm:3.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ sshpk@npm:1.16.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ string-width@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ string_decoder@npm:1.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ strip-ansi@npm:3.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tar@npm:4.4.13 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tough-cookie@npm:2.4.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tunnel-agent@npm:0.6.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tweetnacl@npm:0.14.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ uri-js@npm:4.2.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ util-deprecate@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ uuid@npm:3.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ verror@npm:1.10.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ which@npm:1.3.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ wide-align@npm:1.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ wrappy@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yallist@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 3.28s
➤ YN0000: Failed with errors in 5.44s

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

Remember: any non-Jest exceptions will cause the test to be reported as broken. If you expect something to pass without throwing, you must wrap it into something like await expect(...).resolves.toBeTruthy(). If you instead expect something to throw, you need to wrap it into await expect(...).rejects.toThrow().

Hm indeed - the patch doesn't apply cleanly on 2.0.0 to 2.0.7, which have a very different structure than the later releases:

https://cdn.jsdelivr.net/npm/[email protected]/fsevents.js
https://cdn.jsdelivr.net/npm/[email protected]/fsevents.js

I guess you can't simply upgrade fsevents?

This issue reproduces on master:

Error: expect(received).resolves.toBeTruthy()

Received promise rejected instead of resolved
Rejected to value: [Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js install

➤ YN0000: ┌ Resolution step
➤ YN0032: │ fsevents@npm:2.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ fsevents@npm:2.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0000: └ Completed in 2.29s
➤ YN0000: ┌ Fetch step
➤ YN0013: │ aproba@npm:1.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ are-we-there-yet@npm:1.1.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ abbrev@npm:1.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ ajv@npm:6.11.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ ansi-regex@npm:2.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ asn1@npm:0.2.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ assert-plus@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ asynckit@npm:0.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ aws-sign2@npm:0.7.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ aws4@npm:1.9.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ balanced-match@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ bcrypt-pbkdf@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ brace-expansion@npm:1.1.11 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ caseless@npm:0.12.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ chownr@npm:1.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ code-point-at@npm:1.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ combined-stream@npm:1.0.8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ concat-map@npm:0.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ console-control-strings@npm:1.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ core-util-is@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ dashdash@npm:1.14.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ delayed-stream@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ delegates@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ ecc-jsbn@npm:0.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ env-paths@npm:2.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ extend@npm:3.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ extsprintf@npm:1.3.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fast-deep-equal@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fast-json-stable-stringify@npm:2.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ forever-agent@npm:0.6.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ form-data@npm:2.3.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fs-minipass@npm:1.2.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fs.realpath@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fsevents@npm:2.0.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fsevents@patch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e can't be found in the cache and will be fetched from the disk
➤ YN0013: │ gauge@npm:2.7.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ getpass@npm:0.1.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ glob@npm:7.1.6 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error: fsevents@patch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e: Cannot apply hunk #1
    at applyPatch (/github/workspace/packages/plugin-patch/sources/tools/apply.ts:182:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at /github/workspace/packages/plugin-patch/sources/tools/apply.ts:80:11
    at preserveTime (/github/workspace/packages/plugin-patch/sources/tools/apply.ts:11:18)
    at Object.applyPatchFile (/github/workspace/packages/plugin-patch/sources/tools/apply.ts:79:9)
    at PatchFetcher.patchPackage (/github/workspace/packages/plugin-patch/sources/PatchFetcher.ts:65:9)
    at /github/workspace/packages/plugin-patch/sources/PatchFetcher.ts:28:16
    at loadPackageThroughMirror (/github/workspace/packages/yarnpkg-core/sources/Cache.ts:148:16)
    at /github/workspace/packages/yarnpkg-core/sources/Cache.ts:163:25
➤ YN0013: │ graceful-fs@npm:4.2.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ har-schema@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ har-validator@npm:5.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ has-unicode@npm:2.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ http-signature@npm:1.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ inflight@npm:1.0.6 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ inherits@npm:2.0.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ is-fullwidth-code-point@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ is-typedarray@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ isarray@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ isexe@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ isstream@npm:0.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ jsbn@npm:0.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ json-schema-traverse@npm:0.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ json-schema@npm:0.2.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ json-stringify-safe@npm:5.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ jsprim@npm:1.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ mime-db@npm:1.43.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ mime-types@npm:2.1.26 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minimatch@npm:3.0.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minimist@npm:0.0.8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minipass@npm:2.9.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minizlib@npm:1.3.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ mkdirp@npm:0.5.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ node-gyp@npm:6.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ nopt@npm:4.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ npmlog@npm:4.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ number-is-nan@npm:1.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ oauth-sign@npm:0.9.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ object-assign@npm:4.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ once@npm:1.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ os-homedir@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ os-tmpdir@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ osenv@npm:0.1.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ path-is-absolute@npm:1.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ performance-now@npm:2.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ process-nextick-args@npm:2.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ psl@npm:1.7.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ punycode@npm:1.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ punycode@npm:2.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ qs@npm:6.5.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ readable-stream@npm:2.3.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ request@npm:2.88.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ rimraf@npm:2.7.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ safe-buffer@npm:5.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ safe-buffer@npm:5.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ safer-buffer@npm:2.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ semver@npm:5.7.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ set-blocking@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ signal-exit@npm:3.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ sshpk@npm:1.16.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ string-width@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ string_decoder@npm:1.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ strip-ansi@npm:3.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tar@npm:4.4.13 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tough-cookie@npm:2.4.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tunnel-agent@npm:0.6.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tweetnacl@npm:0.14.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ uri-js@npm:4.2.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ util-deprecate@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ uuid@npm:3.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ verror@npm:1.10.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ which@npm:1.3.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ wide-align@npm:1.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ wrappy@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yallist@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 2.99s
➤ YN0000: Failed with errors in 5.3s
]
    at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-1.zip/node_modules/expect/build/index.js:138:15)
    at module.exports (evalmachine.<anonymous>:2:7)
    at /github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.37-bb4398f5f1-1.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:19
    at executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.37-bb4398f5f1-1.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:22)
    at Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.37-bb4398f5f1-1.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:18)
    at ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.37-bb4398f5f1-1.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:59)
    at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-1.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
    at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-1.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
    at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-1.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)

This issue reproduces on master:

Error: expect(received).resolves.toBeTruthy()

Received promise rejected instead of resolved
Rejected to value: [Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js install

➤ YN0000: ┌ Resolution step
➤ YN0032: │ fsevents@npm:2.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ fsevents@npm:2.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0000: └ Completed in 2.4s
➤ YN0000: ┌ Fetch step
➤ YN0013: │ aproba@npm:1.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ are-we-there-yet@npm:1.1.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ abbrev@npm:1.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ ajv@npm:6.11.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ ansi-regex@npm:2.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ asn1@npm:0.2.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ assert-plus@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ asynckit@npm:0.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ aws-sign2@npm:0.7.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ aws4@npm:1.9.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ balanced-match@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ bcrypt-pbkdf@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ brace-expansion@npm:1.1.11 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ caseless@npm:0.12.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ chownr@npm:1.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ code-point-at@npm:1.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ combined-stream@npm:1.0.8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ concat-map@npm:0.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ console-control-strings@npm:1.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ core-util-is@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ dashdash@npm:1.14.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ delayed-stream@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ delegates@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ ecc-jsbn@npm:0.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ env-paths@npm:2.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ extend@npm:3.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ extsprintf@npm:1.3.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fast-deep-equal@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fast-json-stable-stringify@npm:2.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ forever-agent@npm:0.6.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ form-data@npm:2.3.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fs-minipass@npm:1.2.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fs.realpath@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fsevents@npm:2.0.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ fsevents@patch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e can't be found in the cache and will be fetched from the disk
➤ YN0013: │ gauge@npm:2.7.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ getpass@npm:0.1.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ glob@npm:7.1.6 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error: fsevents@patch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e: Cannot apply hunk #1
    at applyPatch (/github/workspace/packages/plugin-patch/sources/tools/apply.ts:182:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at /github/workspace/packages/plugin-patch/sources/tools/apply.ts:80:11
    at preserveTime (/github/workspace/packages/plugin-patch/sources/tools/apply.ts:11:18)
    at Object.applyPatchFile (/github/workspace/packages/plugin-patch/sources/tools/apply.ts:79:9)
    at PatchFetcher.patchPackage (/github/workspace/packages/plugin-patch/sources/PatchFetcher.ts:65:9)
    at /github/workspace/packages/plugin-patch/sources/PatchFetcher.ts:28:16
    at loadPackageThroughMirror (/github/workspace/packages/yarnpkg-core/sources/Cache.ts:148:16)
    at /github/workspace/packages/yarnpkg-core/sources/Cache.ts:163:25
➤ YN0013: │ graceful-fs@npm:4.2.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ har-schema@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ har-validator@npm:5.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ has-unicode@npm:2.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ http-signature@npm:1.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ inflight@npm:1.0.6 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ inherits@npm:2.0.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ is-fullwidth-code-point@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ is-typedarray@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ isarray@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ isexe@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ isstream@npm:0.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ jsbn@npm:0.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ json-schema-traverse@npm:0.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ json-schema@npm:0.2.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ json-stringify-safe@npm:5.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ jsprim@npm:1.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ mime-db@npm:1.43.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ mime-types@npm:2.1.26 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minimatch@npm:3.0.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minimist@npm:0.0.8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minipass@npm:2.9.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ minizlib@npm:1.3.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ mkdirp@npm:0.5.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ node-gyp@npm:6.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ nopt@npm:4.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ npmlog@npm:4.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ number-is-nan@npm:1.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ oauth-sign@npm:0.9.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ object-assign@npm:4.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ once@npm:1.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ os-homedir@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ os-tmpdir@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ osenv@npm:0.1.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ path-is-absolute@npm:1.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ performance-now@npm:2.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ process-nextick-args@npm:2.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ psl@npm:1.7.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ punycode@npm:1.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ punycode@npm:2.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ qs@npm:6.5.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ readable-stream@npm:2.3.7 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ request@npm:2.88.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ rimraf@npm:2.7.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ safe-buffer@npm:5.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ safe-buffer@npm:5.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ safer-buffer@npm:2.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ semver@npm:5.7.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ set-blocking@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ signal-exit@npm:3.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ sshpk@npm:1.16.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ string-width@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ string_decoder@npm:1.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ strip-ansi@npm:3.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tar@npm:4.4.13 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tough-cookie@npm:2.4.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tunnel-agent@npm:0.6.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ tweetnacl@npm:0.14.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ uri-js@npm:4.2.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ util-deprecate@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ uuid@npm:3.4.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ verror@npm:1.10.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ which@npm:1.3.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ wide-align@npm:1.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ wrappy@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yallist@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 3.21s
➤ YN0000: Failed with errors in 5.61s
]
    at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-1.zip/node_modules/expect/build/index.js:138:15)
    at module.exports (evalmachine.<anonymous>:2:7)
    at /github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.37-bb4398f5f1-1.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:19
    at executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.37-bb4398f5f1-1.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:22)
    at Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.37-bb4398f5f1-1.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:18)
    at ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.37-bb4398f5f1-1.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:59)
    at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-1.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
    at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-1.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
    at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-1.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)

I guess you can't simply upgrade fsevents?

fsevents is coming from a dependency - maybe resolutions can force a higher version?

BTW thanks for fixing the reproduction 😄

I got a similar error:

typescript@patch:typescript@npm%3A2.9.2#builtin<compat/typescript>::version=2.9.2&hash=226bd1 can't be found in the cache and will be fetched from the disk
➤ YN0001: │ Error: typescript@patch:typescript@npm%3A2.9.2#builtin<compat/typescript>::version=2.9.2&hash=226bd1: Cannot apply hunk #1

This can be fixed by adding typescript to "resolutions" in the package.json

Any idea how to workaround this? It's stopping me from testing berry currently. It has the same behaviour on 2.0.0-rc.27

I'll fix it tomorrow, but assuming typescript is an extraneous dependency (not actually used) you can just use resolutions to override the range to 3.x.

same blocking issue with fsevents here.

I tried upgrading to 2.0 and had to turn back to 1 because of this issue

This has nothing to do with typescript though

Same issue here, this new journey on yarn 2 was definitely short^^
yarn install output:
image

The problem is still there on latest berry. You can reproduce it by installing angular project dependencies with yarn. It will crash on

➤ YN0001: │ Error: typescript@patch:typescript@npm%3A3.1.6#builtin::version=3.1.6&hash=c79188: Cannot apply hunk #1

Same problem here, trying to use yarn berry with a project created with Nx and getting:

➤ YN0001: │ Error: typescript@patch:typescript@npm%3A3.6.5#builtin::version=3.6.5&hash=64df9d: Cannot apply hunk #6
at C (/app/.yarn/releases/yarn-berry.js:77:103081)
at async /app/.yarn/releases/yarn-berry.js:77:102344
at async g (/app/.yarn/releases/yarn-berry.js:77:100986)
at async f (/app/.yarn/releases/yarn-berry.js:77:102317)
at async ne.fetchers.patchPackage (/app/.yarn/releases/yarn-berry.js:77:118194)
at async w (/app/.yarn/releases/yarn-berry.js:37:45769)
at async B (/app/.yarn/releases/yarn-berry.js:37:46239)
at async Q (/app/.yarn/releases/yarn-berry.js:37:46715)
at async C.fetchPackageFromCache (/app/.yarn/releases/yarn-berry.js:37:46954)
at async ne.fetchers.fetch (/app/.yarn/releases/yarn-berry.js:77:117113)
➤ YN0000: └ Completed in 16.43s
➤ YN0000: Failed with errors in 28.09s

Tried using latest (yarn set version latest), but same problem:

➤ YN0001: │ Error: typescript@patch:typescript@npm%3A3.6.5#builtin::version=3.6.5&hash=64df9d: Cannot apply hunk #6
at C (/app/.yarn/releases/yarn-2.0.0-rc.36.cjs:77:103081)
at async /app/.yarn/releases/yarn-2.0.0-rc.36.cjs:77:102344
at async g (/app/.yarn/releases/yarn-2.0.0-rc.36.cjs:77:100986)
at async f (/app/.yarn/releases/yarn-2.0.0-rc.36.cjs:77:102317)
at async ne.fetchers.patchPackage (/app/.yarn/releases/yarn-2.0.0-rc.36.cjs:77:118194)
at async w (/app/.yarn/releases/yarn-2.0.0-rc.36.cjs:37:45769)
at async B (/app/.yarn/releases/yarn-2.0.0-rc.36.cjs:37:46239)
at async Q (/app/.yarn/releases/yarn-2.0.0-rc.36.cjs:37:46715)
at async C.fetchPackageFromCache (/app/.yarn/releases/yarn-2.0.0-rc.36.cjs:37:46954)
at async ne.fetchers.fetch (/app/.yarn/releases/yarn-2.0.0-rc.36.cjs:77:117113)
➤ YN0000: └ Completed in 13.39s
➤ YN0000: Failed with errors in 32.17s

And tried source (yarn set version from sources) with same luck:

➤ YN0001: │ Error: typescript@patch:typescript@npm%3A3.6.5#builtin::version=3.6.5&hash=64df9d: Cannot apply hunk #6
at d (/app/.yarn/releases/yarn-sources.cjs:2:190401)
at async /app/.yarn/releases/yarn-sources.cjs:2:189656
at async h (/app/.yarn/releases/yarn-sources.cjs:2:188268)
at async g (/app/.yarn/releases/yarn-sources.cjs:2:189629)
at async W.fetchers.patchPackage (/app/.yarn/releases/yarn-sources.cjs:2:205695)
at async B (/app/.yarn/releases/yarn-sources.cjs:2:227531)
at async Q (/app/.yarn/releases/yarn-sources.cjs:2:227994)
at async v (/app/.yarn/releases/yarn-sources.cjs:2:228470)
at async C.fetchPackageFromCache (/app/.yarn/releases/yarn-sources.cjs:2:228709)
at async W.fetchers.fetch (/app/.yarn/releases/yarn-sources.cjs:2:204564)
➤ YN0000: └ Completed in 13.75s
➤ YN0000: Failed with errors in 30.3s

Any updates? Still cannot upgrade CRA to Yarn 2 🤦‍♂️

➤ YN0066: │ fsevents@patch:fsevents@npm%3A2.2.0#builtin<compat/fsevents>::version=2.2.0&hash=127e8e: Cannot apply hunk #1 (set enableInlineHunks for details)

The original issue was fixed, please open a new one

Upgrading yarn to the version on master works for me

# fail with fsevents: cannot apply hunk
yarn set version berry
yarn add jest

# success
yarn set version from sources
yarn add jest

The 2.2.1 version of fsevents appeared to be the problem, so I updated the version in yarn.lock to the following and it solved

before:

fsevents@^2.1.2, fsevents@^2.1.3:
  version "2.2.1"
  resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.2.1.tgz#1fb02ded2036a8ac288d507a65962bd87b97628d"
  integrity sha512-bTLYHSeC0UH/EFXS9KqWnXuOl/wHK5Z/d+ghd5AsFMYN7wIGkUCOJyzy88+wJKkZPGON8u4Z9f6U4FdgURE9qA==

fsevents@~2.1.2:
  version "2.1.2"
  resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805"
  integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==

after:

fsevents@~2.1.2, fsevents@^2.1.2, fsevents@^2.1.3:
  version "2.1.2"
  resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805"
  integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==

This still happens for me, as well, when using [email protected]. Unfortunately I wasn't able to run yarn set version from sources, due to https://github.com/yarnpkg/berry/issues/2187

Happen to me as well

Was this page helpful?
0 / 5 - 0 ratings

Related issues

milichev picture milichev  ·  3Comments

tiansijie picture tiansijie  ·  4Comments

Mike-Dax picture Mike-Dax  ·  3Comments

IanVS picture IanVS  ·  4Comments

chrisands picture chrisands  ·  3Comments