[Bug] compat/typescript patch does not apply on typescript@4.2.0-beta
See original GitHub issue- I’d be willing to implement a fix
Describe the bug
➤ YN0013: │ typescript@npm:4.2.0-beta can't be found in the cache and
➤ YN0013: │ typescript@patch:typescript@npm%3A4.2.0-beta#builtin<comp
➤ YN0013: │ typescript@npm:4.2.0-beta can't be found in the cache and
➤ YN0066: │ typescript@patch:typescript@npm%3A4.2.0-beta#builtin<compat/typescript>::version=4.2.0-beta&hash=cc6730: Cannot apply hunk #6
➤ YN0000: │ ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["None"] = 0] = "None";
➤ YN0000: │ ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Partial"] = 1] = "Partial";
➤ YN0000: │ ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Full"] = 2] = "Full";
➤ YN0028: │ + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Resolutions"] = 3] = "Resolutions";
➤ YN0000: │ })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {}));
➤ YN0000: │ function updateMissingFilePathsWatch(program, missingFileWatches, createMissingFileWatch) {
➤ YN0000: │ var missingFilePaths = program.getMissingFilePaths();
To Reproduce
yarn add typescript@4.2.0-beta
(or yarn up
); with enableInlineHunks: true
in the .yarnrc.yml
for the diff printout.
Bonus points: the Playground reproduction fails because the node version is too old.
Environment if relevant (please complete the following information):
- OS: WSL
- Node version: 14.15.4
- Yarn version: 2.4.0
Additional context
The patch applies in older versions of typescript.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
git: patch does not apply
Doesn't work for me in the case where the issues are caused by whitespace differences. I never get a prompt, and --3way doesn't...
Read more >git: patch does not apply
Hello! I have a certain patch called my_pcc_branch.patch. When I try to apply it, I get following message: $ git apply --check my_pcc_branch.patch...
Read more >git-apply - Apply a patch to files and/or to the index
This command applies the patch but does not create a commit. ... If the file to be patched in the working tree is...
Read more >5.3 Distributed Git - Maintaining a Project
git apply --check 0001-seeing-if-this-helps-the-gem.patch error: patch failed: ticgit.gemspec:1 error: ticgit.gemspec: patch does not apply.
Read more >How to apply git diff and fix patch failed error - Fresh Beginning
Git diff is a powerful command which allows you to see you recently made changes whether they are staged or not.
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
You do not imagine how much you saved me time there. I hate the checksum issue I’m getting with these compat patches… And I dont even use PnP :face_exhaling: I read the PR and the Q&A but I have no break by disabling this. Also why not simply check nodeLinker === ‘pnp’ then patch… Well thanks again you saved me a bunch of time with this quick fix 🙂
Sure, create
.yarn/plugins/@yarnpkg/plugin-compat.cjs
:Add to
.yarnrc.yml
: