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

Update auth-provider path #481

Merged
merged 1 commit into from
May 23, 2019
Merged

Update auth-provider path #481

merged 1 commit into from
May 23, 2019

Conversation

russell
Copy link
Contributor

@russell russell commented May 23, 2019

Looks like after moving the backends, this path needs to be updated to be able to perform the relative import

using the code:

const Client = require('kubernetes-client').Client;
const Request = require('kubernetes-client/backends/request');
const backend = new Request(Request.config.fromKubeconfig());
const client = new Client({ backend, version: '1.13' });
await client.loadSpec();

i get this error

Error: Failed to get /openapi/v2 and /swagger.json: Cannot find module '../auth-providers/cmd.js'
Require stack:
- /Users/rsim/zendesk/scooter-ui/node_modules/kubernetes-client/backends/request/client.js
- /Users/rsim/zendesk/scooter-ui/node_modules/kubernetes-client/backends/request/index.js
- /Users/rsim/zendesk/scooter-ui/node_modules/kubernetes-client/lib/swagger-client.js
- /Users/rsim/zendesk/scooter-ui/node_modules/kubernetes-client/lib/index.js
- <repl>
    at /Users/rsim/zendesk/scooter-ui/node_modules/kubernetes-client/lib/swagger-client.js:57:15
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
    at async <anonymous>:1:26
> }

Looks like after moving the backends, this path needs to be updated to be able to perform the relative import

```
Error: Failed to get /openapi/v2 and /swagger.json: Cannot find module '../auth-providers/cmd.js'
Require stack:
- /Users/rsim/zendesk/scooter-ui/node_modules/kubernetes-client/backends/request/client.js
- /Users/rsim/zendesk/scooter-ui/node_modules/kubernetes-client/backends/request/index.js
- /Users/rsim/zendesk/scooter-ui/node_modules/kubernetes-client/lib/swagger-client.js
- /Users/rsim/zendesk/scooter-ui/node_modules/kubernetes-client/lib/index.js
- <repl>
    at /Users/rsim/zendesk/scooter-ui/node_modules/kubernetes-client/lib/swagger-client.js:57:15
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
    at async <anonymous>:1:26
> }
```
Copy link
Contributor

@silasbw silasbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh no! I'm so sorry. Thanks for the fix 🥇 !

@silasbw silasbw merged commit 5149309 into godaddy:master May 23, 2019
@silasbw
Copy link
Contributor

silasbw commented May 23, 2019

Included with kubernetes-client@8.1.2.

Thanks again @russell .

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

Successfully merging this pull request may close these issues.

None yet

2 participants