-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running tsc manually crashes with "Parameter symbol already has a cached type which differs from newly assigned type" #66894
Comments
🤔 Hang on... I ran
... and now running Ok. Nevermind, I guess? |
Super weird! Maybe a random bug with how yarn resolves binaries? |
🤷 Well, hopefully if anyone else encounters this, they'll find my "solution" helpful. |
Reopening this because it really happens a lot. I'd love to find a real solution. |
This issue happens to me every time I miss a TypeScript error. For example, the following diff produces a crash: diff --git a/client/my-sites/hosting/sftp-card/ssh-keys.tsx b/client/my-sites/hosting/sftp-card/ssh-keys.tsx
index 7298936fa7..512416acab 100644
--- a/client/my-sites/hosting/sftp-card/ssh-keys.tsx
+++ b/client/my-sites/hosting/sftp-card/ssh-keys.tsx
@@ -18,7 +18,7 @@ import { useAttachSshKeyMutation } from './use-attach-ssh-key';
import './ssh-keys.scss';
interface SshKeysProps {
- siteId: number;
+ sited: number;
siteSlug: string;
username: string;
disabled: boolean; Maybe this is a known issue though? microsoft/TypeScript#50773 @Automattic/team-calypso-frameworks Is TypeScript supposed to crash this hard when there's an error? I would've expected more friendly error output... |
I hit this same error when trying to run |
|
Quick summary
You can manually run the TypeScript type checks for the client directory with the command
yarn tsc -p client --noEmit
. This is helpful for finding TS errors before making a commit.However, now when I run that command, I get the following unhelpful error:
This same error happens if I run
yarn tsc --build client/tsconfig.json
which appears to run fine in the CI environment. I tried starting with a freshnode_modules
and removing.tsc-cache
but neither has any effect.It seems to have been introduced by #66817. Before that commit, running the command works as expected. Afterward, it produces the error above.
However, I can't see how that PR could have caused any problems. I tried manually undoing the changes it made and the error continues.
Steps to reproduce
git checkout f0d3672658
(this is the merge commit which matches up to DSP Widget: add hook to test if enabled #66817)yarn tsc -p client --noEmit
git checkout f0d3672658~1
(this is the commit before DSP Widget: add hook to test if enabled #66817)yarn tsc -p client --noEmit
What you expected to happen
tsc
should run and display any TypeScript errors.What actually happened
tsc
fails.The text was updated successfully, but these errors were encountered: