Skip to content
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

Not able to make the js client with Angular 8.3.21: unable to establish process.binding('uv') #404

Closed
lwang16 opened this issue Jan 28, 2020 · 4 comments

Comments

@lwang16
Copy link

lwang16 commented Jan 28, 2020

Error:
errname.js:18 execa/lib/errname: unable to establish process.binding('uv') Error: process.binding is not supported at Object.push../node_modules/process/browser.js.process.binding (browser.js:177)
at Object../node_modules/@kubernetes/client-node/node_modules/execa/lib/errname.js (errname.js:12)
at webpack_require (bootstrap:79)
at Object../node_modules/@kubernetes/client-node/node_modules/execa/index.js (index.js:11)
at webpack_require (bootstrap:79)
at Object../node_modules/@kubernetes/client-node/dist/config.js (config.js:4)
at webpack_require (bootstrap:79)
at Object../node_modules/@kubernetes/client-node/dist/index.js (index.js:4)
at webpack_require (bootstrap:79)
at new K8sClientService (k8s.service.ts:12)

My code (tried both import and require) k8s.service.ts:
import { Injectable } from '@angular/core';
//import * as k8s from '@kubernetes/client-node'

@Injectable({
providedIn: 'root'
})
export class K8sClientService {
public k8sApi;

constructor() {
const k8s = require('@kubernetes/client-node');
const kc = new k8s.KubeConfig();
kc.loadFromDefault()
this.k8sApi = kc.makeApiClient(k8s.CoreV1Api);
}
}

@brendandburns
Copy link
Contributor

Is this running in a browser? I don't know that this client library will work in a browser.

@lwang16
Copy link
Author

lwang16 commented Jan 30, 2020

Is this running in a browser? I don't know that this client library will work in a browser.

Thank you for the reply. Yes I'm trying to run JS k8s client in a browser and didn't have much luck

@brendandburns
Copy link
Contributor

Yes, this client is currently only supported in nodejs, not in a browser.

Closing this issue, please use the /reopen command in a comment to reopen the issue.

@brendandburns
Copy link
Contributor

Ref #165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants