We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I pulled the code directly from the typescript example in the README:
import * as ApiClient from 'kubernetes-client'; const Client = ApiClient.Client1_13; const client = new Client({ version: '1.13' });
My only difference is loading the kubeconfig from the cluster:
const kubeconfig = new KubeConfig(); kubeconfig.loadFromCluster(); const backend = new Request({ kubeconfig }); return new ApiClient.Client1_13({ backend, version: '1.13' });
When I run this typescript gives me an error:
Error initializing client: TypeError: Client is not a constructor
I tried everything I could think of and searched the googles and couldn't come up with anything, any help would be greatly appreciated!
node: 16.15.0 typescript: 4.6.2
The text was updated successfully, but these errors were encountered:
I finally figured out a workaround, it's not the greatest though. I basically had to cut the typings out of it:
import pkg from 'kubernetes-client/lib/index'; const kubeconfig = new KubeConfig(); kubeconfig.loadFromCluster(); const backend = new Request({ kubeconfig }); const { Client1_13 } = pkg; return new Client1_13({ backend, version: '1.13' });
Sorry, something went wrong.
No branches or pull requests
I pulled the code directly from the typescript example in the README:
My only difference is loading the kubeconfig from the cluster:
When I run this typescript gives me an error:
Error initializing client: TypeError: Client is not a constructor
I tried everything I could think of and searched the googles and couldn't come up with anything, any help would be greatly appreciated!
node: 16.15.0
typescript: 4.6.2
The text was updated successfully, but these errors were encountered: