Skip to content

[Bug] Cannot apply hunk #1 #886

Closed
Closed
@dzintars

Description

@dzintars

Describe the bug

I see several required packages failing to install. There is one of them. Not sure how should i address this issue.

To Reproduce

Remove Yarn 1

sudo dnf remove yarn

Install Yarn 2

sudo npm install -g yarn@berry

Init project

mkdir yarn2-test && cd yarn2-test
yarn init                                     
{
  name: 'yarn2-test'
}

Install packages

yarn add -D rollup                            
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0.59s
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0.06s
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 0.04s
➤ YN0000: Done in 0.69s
yarn add -D rollup-plugin-minify-html-literals
➤ YN0000: ┌ Resolution step
➤ YN0002: │ yarn2-test@workspace:. doesn't provide rollup@^0.65.2 || ^1.0.0 requested by rollup-plugin-minify-html-literals@npm:1.2.2
➤ YN0000: └ Completed in 1.95s
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 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
    at c (/usr/local/lib/node_modules/yarn/bin/yarn.js:58:888149)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at async /usr/local/lib/node_modules/yarn/bin/yarn.js:58:890280
    at async o (/usr/local/lib/node_modules/yarn/bin/yarn.js:58:887432)
    at async Object.t.applyPatchFile (/usr/local/lib/node_modules/yarn/bin/yarn.js:58:890253)
    at async t.PatchFetcher.patchPackage (/usr/local/lib/node_modules/yarn/bin/yarn.js:58:887187)
    at async /usr/local/lib/node_modules/yarn/bin/yarn.js:58:886444
    at async /usr/local/lib/node_modules/yarn/bin/yarn.js:36:569449
    at async /usr/local/lib/node_modules/yarn/bin/yarn.js:36:569392
    at async /usr/local/lib/node_modules/yarn/bin/yarn.js:36:570734
➤ YN0000: └ Completed in 7.89s
➤ YN0000: Failed with errors in 9.84s

Environment if relevant (please complete the following information):

  • OS: [Linux (Fedora 31)]
  • Node version [v12.14.1]
  • Yarn version [2.0.0-rc.27]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions