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.

Compilation breaks on Typescript 4.8.2, Ubuntu 20.04

See original GitHub issue

When 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:closed
  • Created a year ago
  • Comments:27 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
JarnoRFBcommented, Nov 29, 2022

@ipsi Somehow the changed got merged, but never released. See the comments in https://github.com/kubernetes-client/javascript/pull/897

1reaction
JarnoRFBcommented, Oct 21, 2022

@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 and esModuleInterop is turned on. Only skipLibCheck helps, but that turns off the checking of all libs, as was already mentioned.

Read more comments on GitHub >

github_iconTop 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 >

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