Skip to content

[Bug]: typescript patch fails to apply with [email protected] #3722

@ezracelli

Description

@ezracelli

Self-service

  • I'd be willing to implement a fix

Describe the bug

This is replicable on first install only — on subsequent uninstall/reinstalls of typescript@^4.5.1-rc, the install appears to succeed but the symptoms still persist.

$ yarn add --dev typescript@^4.5.1-rc
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 815ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ typescript@npm:4.5.1-rc can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ typescript@patch:typescript@npm%3A4.5.1-rc#~builtin<compat/typescript>::version=4.5.1-rc&hash=ddd1e8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ typescript@npm:4.5.1-rc can't be found in the cache and will be fetched from the remote registry
➤ YN0066: │ typescript@patch:typescript@npm%3A4.5.1-rc#~builtin<compat/typescript>::version=4.5.1-rc&hash=ddd1e8: Cannot apply hunk #2
➤ YN0000: └ Completed in 22s 379ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: Done with warnings in 23s 511ms
$ yarn tsc --noEmit

[snip]

[snip].ts:3:17 - error TS2307: Cannot find module '[snip]' or its corresponding type declarations.

3 import [snip] from "[snip]";
                      ~~~~~~


Found 24 errors.

To reproduce

$ yarn add --dev typescript@^4.5.1-rc
{
  "devDependencies": {
    "typescript": "^4.5.1-rc",
  }
}

Environment

System:
    OS: macOS 12.0
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  Binaries:
    Node: 16.12.0 - /private/var/folders/zk/9kgkd8tx4fq9ptvlc7cc8f0c0000gn/T/xfs-59651938/node
    Yarn: 3.1.0 - /private/var/folders/zk/9kgkd8tx4fq9ptvlc7cc8f0c0000gn/T/xfs-59651938/yarn
    npm: 8.1.3 - ~/.npm/bin/npm

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupholdedReal issues without formal reproduction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions