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

[Bug] Cannot install fsevents - Cannot apply hunk #1 #719

Closed
1 task
arutkowski00 opened this issue Jan 21, 2020 · 21 comments · Fixed by #871 or #2078
Closed
1 task

[Bug] Cannot install fsevents - Cannot apply hunk #1 #719

arutkowski00 opened this issue Jan 21, 2020 · 21 comments · Fixed by #871 or #2078
Labels
bug Something isn't working reproducible This issue can be successfully reproduced

Comments

@arutkowski00
Copy link

arutkowski00 commented Jan 21, 2020

  • 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

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 #692

@arutkowski00 arutkowski00 added the bug Something isn't working label Jan 21, 2020
@yarnbot yarnbot added the broken-repro The reproduction in this issue is broken label Jan 21, 2020
@yarnbot

This comment has been minimized.

@yarnbot

This comment has been minimized.

@arcanis
Copy link
Member

arcanis commented Jan 21, 2020

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?

@yarnbot yarnbot added reproducible This issue can be successfully reproduced and removed broken-repro The reproduction in this issue is broken labels Jan 21, 2020
@yarnbot

This comment has been minimized.

@yarnbot
Copy link
Collaborator

yarnbot commented Jan 21, 2020

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

�[94m➤�[39m �[90mYN0000�[39m: ┌ Resolution step
�[93m➤�[39m YN0032: │ �[38;5;173mfsevents�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.0.7�[39m: Implicit dependencies on node-gyp are discouraged
�[93m➤�[39m YN0032: │ �[38;5;173mfsevents�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.0.7�[39m: Implicit dependencies on node-gyp are discouraged
�[94m➤�[39m �[90mYN0000�[39m: └ Completed in 2.4s
�[94m➤�[39m �[90mYN0000�[39m: ┌ Fetch step
�[94m➤�[39m YN0013: │ �[38;5;173maproba�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.2.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mare-we-there-yet�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.1.5�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mabbrev�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.1.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173majv�[39m�[38;5;111m@�[39m�[38;5;111mnpm:6.11.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mansi-regex�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.1.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173masn1�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.2.4�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173massert-plus�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173masynckit�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.4.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173maws-sign2�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.7.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173maws4�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.9.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mbalanced-match�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mbcrypt-pbkdf�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mbrace-expansion�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.1.11�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mcaseless�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.12.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mchownr�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.1.3�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mcode-point-at�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.1.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mcombined-stream�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.8�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mconcat-map�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.0.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mconsole-control-strings�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.1.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mcore-util-is�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mdashdash�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.14.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mdelayed-stream�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mdelegates�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mecc-jsbn�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.1.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173menv-paths�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.2.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mextend�[39m�[38;5;111m@�[39m�[38;5;111mnpm:3.0.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mextsprintf�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.3.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mfast-deep-equal�[39m�[38;5;111m@�[39m�[38;5;111mnpm:3.1.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mfast-json-stable-stringify�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.1.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mforever-agent�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.6.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mform-data�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.3.3�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mfs-minipass�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.2.7�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mfs.realpath�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mfsevents�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.0.7�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mfsevents�[39m�[38;5;111m@�[39m�[38;5;111mpatch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e�[39m can't be found in the cache and will be fetched from the disk
�[94m➤�[39m YN0013: │ �[38;5;173mgauge�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.7.4�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mgetpass�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.1.7�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mglob�[39m�[38;5;111m@�[39m�[38;5;111mnpm:7.1.6�[39m can't be found in the cache and will be fetched from the remote registry
�[91m➤�[39m YN0001: │ Error: �[38;5;173mfsevents�[39m�[38;5;111m@�[39m�[38;5;111mpatch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e�[39m: 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
�[94m➤�[39m YN0013: │ �[38;5;173mgraceful-fs�[39m�[38;5;111m@�[39m�[38;5;111mnpm:4.2.3�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mhar-schema�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.0.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mhar-validator�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.1.3�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mhas-unicode�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.0.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mhttp-signature�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.2.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173minflight�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.6�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173minherits�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.0.4�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mis-fullwidth-code-point�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mis-typedarray�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173misarray�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173misexe�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.0.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173misstream�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.1.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mjsbn�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.1.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mjson-schema-traverse�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.4.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mjson-schema�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.2.3�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mjson-stringify-safe�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.0.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mjsprim�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.4.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mmime-db�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.43.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mmime-types�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.1.26�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mminimatch�[39m�[38;5;111m@�[39m�[38;5;111mnpm:3.0.4�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mminimist�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.0.8�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mminipass�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.9.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mminizlib�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.3.3�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mmkdirp�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.5.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mnode-gyp�[39m�[38;5;111m@�[39m�[38;5;111mnpm:6.1.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mnopt�[39m�[38;5;111m@�[39m�[38;5;111mnpm:4.0.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mnpmlog�[39m�[38;5;111m@�[39m�[38;5;111mnpm:4.1.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mnumber-is-nan�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173moauth-sign�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.9.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mobject-assign�[39m�[38;5;111m@�[39m�[38;5;111mnpm:4.1.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173monce�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.4.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mos-homedir�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mos-tmpdir�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mosenv�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.1.5�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mpath-is-absolute�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mperformance-now�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.1.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mprocess-nextick-args�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.0.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mpsl�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.7.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mpunycode�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.4.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mpunycode�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.1.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mqs�[39m�[38;5;111m@�[39m�[38;5;111mnpm:6.5.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mreadable-stream�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.3.7�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mrequest�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.88.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mrimraf�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.7.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173msafe-buffer�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.1.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173msafe-buffer�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.2.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173msafer-buffer�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.1.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173msemver�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.7.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mset-blocking�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.0.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173msignal-exit�[39m�[38;5;111m@�[39m�[38;5;111mnpm:3.0.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173msshpk�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.16.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mstring-width�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mstring_decoder�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.1.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mstrip-ansi�[39m�[38;5;111m@�[39m�[38;5;111mnpm:3.0.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mtar�[39m�[38;5;111m@�[39m�[38;5;111mnpm:4.4.13�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mtough-cookie�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.4.3�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mtunnel-agent�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.6.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mtweetnacl�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.14.5�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173muri-js�[39m�[38;5;111m@�[39m�[38;5;111mnpm:4.2.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mutil-deprecate�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173muuid�[39m�[38;5;111m@�[39m�[38;5;111mnpm:3.4.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mverror�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.10.0�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mwhich�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.3.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mwide-align�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.1.3�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173mwrappy�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.0.2�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m YN0013: │ �[38;5;173myallist�[39m�[38;5;111m@�[39m�[38;5;111mnpm:3.1.1�[39m can't be found in the cache and will be fetched from the remote registry
�[94m➤�[39m �[90mYN0000�[39m: └ Completed in 3.21s
�[91m➤�[39m 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)

@arutkowski00
Copy link
Author

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 😄

@FabianHippmann
Copy link

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

@mikecousins
Copy link

mikecousins commented Jan 26, 2020

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

@arcanis
Copy link
Member

arcanis commented Jan 27, 2020

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.

@OneCyrus
Copy link

same blocking issue with fsevents here.

@mattrcullum
Copy link

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

@mikecousins
Copy link

This has nothing to do with typescript though

@doums
Copy link

doums commented Feb 11, 2020

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

@miloslavnosek
Copy link

miloslavnosek commented Apr 23, 2020

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<compat/typescript>::version=3.1.6&hash=c79188: Cannot apply hunk #1

@yorch
Copy link

yorch commented Jun 27, 2020

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<compat/typescript>::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<compat/typescript>::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<compat/typescript>::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

@milichev
Copy link

milichev commented Nov 3, 2020

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)

@merceyz
Copy link
Member

merceyz commented Nov 3, 2020

The original issue was fixed, please open a new one

@brandon-leapyear
Copy link

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

@tonyfromundefined
Copy link

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==

@joeldenning
Copy link

joeldenning commented Nov 29, 2020

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 #2187

@GiladShoham
Copy link
Contributor

Happen to me as well

@yarnpkg yarnpkg locked as resolved and limited conversation to collaborators Nov 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working reproducible This issue can be successfully reproduced
Projects
None yet