Compilation breaks on Typescript 4.8.2, Ubuntu 20.04
See original GitHub issueWhen running tsc, it breaks with the following errors:
root@ec42f57e3eda:/mirrord/vscode-ext# tsc
node_modules/@kubernetes/client-node/dist/informer.d.ts:19:41 - error TS2344: Type 'T' does not satisfy the constraint 'KubernetesObject'.
19 on(verb: string, fn: ObjectCallback<T>): void;
~
node_modules/@kubernetes/client-node/dist/informer.d.ts:18:27
18 export interface Informer<T> {
~
This type parameter might need an `extends KubernetesObject` constraint.
node_modules/@kubernetes/client-node/dist/informer.d.ts:20:42 - error TS2344: Type 'T' does not satisfy the constraint 'KubernetesObject'.
20 off(verb: string, fn: ObjectCallback<T>): void;
~
node_modules/@kubernetes/client-node/dist/informer.d.ts:18:27
18 export interface Informer<T> {
~
This type parameter might need an `extends KubernetesObject` constraint.
node_modules/@kubernetes/client-node/dist/informer.d.ts:24:106 - error TS2344: Type 'T' does not satisfy the constraint 'KubernetesObject'.
24 export declare function makeInformer<T>(kubeconfig: KubeConfig, path: string, listPromiseFn: ListPromise<T>, labelSelector?: string): Informer<T>;
~
node_modules/@kubernetes/client-node/dist/informer.d.ts:24:38
24 export declare function makeInformer<T>(kubeconfig: KubeConfig, path: string, listPromiseFn: ListPromise<T>, labelSelector?: string): Informer<T>;
~
This type parameter might need an `extends KubernetesObject` constraint.
Found 3 errors in the same file, starting at: node_modules/@kubernetes/client-node/dist/informer.d.ts:19
** Client Version ** 0.16.3
** Server Version ** N/A
To Reproduce Steps to reproduce the behavior: Run tsc on Ubuntu 20.04 with TypeScript 4.8.2
Environment (please complete the following information):
- OS: Ubuntu 20.04
- NodeJS Version 12.22.9
Additional context
You can view the error in a wider context in our CI logs.
Issue Analytics
- State:
- Created a year ago
- Comments:27 (15 by maintainers)
Top Results From Across the Web
Typescript compiler broken on Ubuntu 20 #108320 - GitHub
Working on my react/typescript project when suddenly it stopped recongnizing JSX on returns. The project still runs, only vs marks a lot errors....
Read more >reactjs - Why does this break in TypeScript 4.8? - Stack Overflow
This was a bug in Typescript with the 4.8.2 release. It has since been fixed in the 4.8.3 release.
Read more >ts-node - npm
ts-node is a TypeScript execution engine and REPL for Node.js. It JIT transforms TypeScript into JavaScript, enabling you to directly execute ...
Read more >Announcing TypeScript 4.8 - Microsoft Developer Blogs
Today we're excited to announce the release of TypeScript 4.8! ... These breaks are now detailed in our Correctness Fixes and Breaking ......
Read more >Compare Packages Between Distributions - DistroWatch.com
News and feature lists of Linux and BSD distributions. ... Apache-LogFormat-Compiler 0.360.0 apache-mode 2.2.0 ... broken-age 2.4.800398 broot 1.16.2
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
@ipsi Somehow the changed got merged, but never released. See the comments in https://github.com/kubernetes-client/javascript/pull/897
@brendandburns I put together a minial example here https://github.com/JarnoRFB/kube-typerror. Let me know if this helps. The error is there even though
node_modules
is excluded andesModuleInterop
is turned on. OnlyskipLibCheck
helps, but that turns off the checking of all libs, as was already mentioned.