question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug?]: TS 4.9.3 patch doesn't work with yarn@3.2.4

See original GitHub issue

Self-service

  • I’d be willing to implement a fix

Describe the bug

Installing typescript@4.9.3 with yarn@3.2.4 results in many spurious type errors when tsc is run.

To reproduce


await packageJsonAndInstall({
    dependencies: {
        typescript: '4.8.4'
    }
})

await packageJsonAndInstall({
    dependencies: {
        typescript: '4.9.3'
    }
})

Environment

System:
    OS: macOS 13.0.1
    CPU: (8) arm64 Apple M1 Pro
  Binaries:
    Node: 18.12.1 - /private/var/folders/k5/x6ks_wdd1b31y221zccrmbtm0000gn/T/xfs-5f8b4758/node
    Yarn: 3.2.4 - /private/var/folders/k5/x6ks_wdd1b31y221zccrmbtm0000gn/T/xfs-5f8b4758/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm

Additional context

Might be similar to #4915. Running yarn add typescript@4.9.3 when 4.8.4 is installed results in…

➤ YN0000: ┌ Fetch step
➤ YN0013: │ typescript@npm:4.9.3 can't be found in the cache and will be
➤ YN0013: │ typescript@patch:typescript@npm%3A4.9.3#~builtin<compat/types
➤ YN0013: │ typescript@npm:4.9.3 can't be found in the cache and will be
➤ YN0066: │ typescript@patch:typescript@npm%3A4.9.3#~builtin<compat/typescript>::version=4.9.3&hash=701156: Cannot apply hunk #8
➤ YN0019: │ typescript-npm-4.8.3-7c28a78612-8286a5edca.zip appears to be
➤ YN0019: │ typescript-patch-2a94c71984-2222d2382f.zip appears to be unus
➤ YN0000: └ Completed in 18s 375ms

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
arcaniscommented, Nov 16, 2022

I just released the 3.3.0 so that should also be an option.

2reactions
merceyzcommented, Nov 16, 2022

Fixed in https://github.com/yarnpkg/berry/pull/5020 and released in v3.3.0.

yarn set version berry && yarn install

Fixed in https://github.com/yarnpkg/berry/pull/5020, we’ll make a new v3 release soon but until then you can use either a v4 canary build or v3 from sources.

yarn set version canary
yarn set version from sources --branch merceyz/release/3.3.0
Read more comments on GitHub >

github_iconTop Results From Across the Web

The Angular Compiler requires TypeScript >=3.4.0 and ...
Was getting a similar error when trying to create an app with "ionic start". Uninstalling and reinstalling the node helped me fix it....
Read more >
webpack-dev-server | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
ts-node
TypeScript execution environment and REPL for node.js, with source map support. Latest version: 10.9.1, last published: 5 months ago.
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug :1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance to ... Bug:70028 - "[PATCH] PORTAGE_BINHOST with custom FTP-port doesn't work" ...
Read more >
Yarn.lock: How to Update it
If you remove the lock file completely and then run yarn install , yarn will re-resolve all versions to the latest allowed by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found