berry: [Bug] Typescript 3.6.5 installation failure (cannot apply hunk)
Installing typescript 3.6.5
fails when applying compat patch.
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 1.29s
➤ YN0000: ┌ Fetch step
➤ YN0013: │ typescript@patch:typescript@npm%3A3.6.5#builtin<compat/typescript>::version=3.6.5&hash=c79188 can't be found in the cache and will be fetched from the disk
➤ YN0001: │ Error: typescript@patch:typescript@npm%3A3.6.5#builtin<compat/typescript>::version=3.6.5&hash=c79188: Cannot apply hunk #5
at c (/tmp/berry-test-ts3.6/.yarn/releases/yarn-berry.js:56:59007)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async /tmp/berry-test-ts3.6/.yarn/releases/yarn-berry.js:56:61149
at async o (/tmp/berry-test-ts3.6/.yarn/releases/yarn-berry.js:56:58290)
at async Object.t.applyPatchFile (/tmp/berry-test-ts3.6/.yarn/releases/yarn-berry.js:56:61122)
at async t.PatchFetcher.patchPackage (/tmp/berry-test-ts3.6/.yarn/releases/yarn-berry.js:56:58045)
at async /tmp/berry-test-ts3.6/.yarn/releases/yarn-berry.js:56:57194
at async d (/tmp/berry-test-ts3.6/.yarn/releases/yarn-berry.js:42:91814)
at async /tmp/berry-test-ts3.6/.yarn/releases/yarn-berry.js:42:92398
at async /tmp/berry-test-ts3.6/.yarn/releases/yarn-berry.js:42:93503
➤ YN0000: └ Completed in 14.5s
➤ YN0000: Failed with errors in 15.79s
The same error occurs for the whole 3.6.x
series. 3.5
installs correctly, so does 3.7
.
Installing yarn from sources doesn’t help.
For context, this happened while installing @angular-devkit/build-angular@0.901.1
.
Reproduction:
$ mkdir repro
$ cd repro
$ yarn set version berry
$ yarn init
$ yarn add typescript@3.6
Env (linux)
$ yarn --version
2.0.0-rc.32
$ node --version
v12.16.1
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 14
- Comments: 15 (4 by maintainers)
4.1.0 is still in beta, and any support for it is best effort. It literally just got merged in the trunk, so you’ll have to use the master branch to install it.
Do you have the same yarn version in both projects? Yarn patches typescript to add support for PnP.
Got something similar: