[Bug]: typescript patch fails to apply with typescript@4.5
See original GitHub issueSelf-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
Issue Analytics
- State:
- Created 2 years ago
- Reactions:16
- Comments:22 (7 by maintainers)
Top Results From Across the Web
Documentation - TypeScript 4.5
That means you get to update your types on your own terms. ... error: Type instantiation is excessively deep and possibly infinite.
Read more >Announcing TypeScript 4.5 - Microsoft Developer Blogs
TypeScript 4.5 now can narrow values that have template string types, and also recognizes template string types as discriminants. As an example ...
Read more >ts-node - npm
Any error that is not a TSError is from node.js (e.g. SyntaxError ), and cannot be fixed by TypeScript or ts-node. These are...
Read more >error TS2339: Property 'msSaveOrOpenBlob' does not exist on ...
its was working properly but after update typescript into latest version I am getting multiple error there is two error . window.navigator.msSaveOrOpenBlob(data ...
Read more >Get a catch block error message with TypeScript - Kent C. Dodds
October 28th, 2021 — 5 min read ... It's because (as of recently) TypeScript defaults our error type to unknown . Which is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The updated patch was released in
3.2.0-rc.5For those
yarn set version canary && yarn installdoes not work, ts2307 error could be occurred due to typescript configuration of your IDE. If you are using vscode try the command below.and the reference is here