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

First line of code in Quickstart is broken #430

Closed
bdrtsky opened this issue May 23, 2020 · 1 comment · Fixed by #480
Closed

First line of code in Quickstart is broken #430

bdrtsky opened this issue May 23, 2020 · 1 comment · Fixed by #480

Comments

@bdrtsky
Copy link

bdrtsky commented May 23, 2020

Was very exciting to try your software. Started from Quickstart, but literally first line of code example is broken:

const { KratosPublicSDK } = require('@oryd/kratos-client')

or

import { KratosPublicSDK } from '@oryd/kratos-client'

gives

TypeError: KratosPublicSDK is not a constructor

or

index.ts:1:10 - error TS2305: Module '"./node_modules/@oryd/kratos-client/dist/api"' has no exported member 'KratosPublicSDK'.

1 import { KratosPublicSDK } from '@oryd/kratos-client'

I know documentation is hard. But first line of code in introductionary Quickstart is too much 😀Any chance to fix it?

@aeneasr
Copy link
Member

aeneasr commented May 25, 2020

The correct usage for NodeJS is:

import {
  AdminApi,
} from '@oryd/kratos-client'

const adminEndpoint = new AdminApi(config.kratos.admin)

aeneasr added a commit that referenced this issue Jun 5, 2020
aeneasr added a commit that referenced this issue Jun 5, 2020
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 a pull request may close this issue.

2 participants