still it is throwing the same error.
# talk-kratos
b
still it is throwing the same error.
b
🤔 what version is your package? I have it workign with said line
b
it is undefined right
in my case it is undefined but in my used case it is showing that it is a constructor
b
Its just a "namespace"
b
const kratos = new PublicApi(new Configuration({ basePath: 'http://127.0.0.1:4433' }));
how can I used it in this case
*use
@blue-state-12403
b
sorry i do not know for sure, im just another customer. But if you look at the secureapp, directly from ory, they do it like this: https://github.com/ory/kratos-selfservice-ui-node/blob/master/src/pkg/sdk/index.ts
i just wanted to help fix the import error 🙈
b
its ok man.
Thanks!
b
ha!
message has been deleted
tada 🙂
Copy code
import PublicApi, {Configuration} from '@ory/kratos-client';


const api = new PublicApi.V0alpha2Api(new Configuration({
    basePath: '<http://example.org>',
}));
or just
Copy code
import {Configuration, V0alpha2Api} from '@ory/kratos-client';


const api = new V0alpha2Api(new Configuration({
    basePath: '<http://example.org>',
}));
b
TypeError: Cannot read properties of undefined (reading 'V0alpha2Api')
throwing this error
now its working thanks!
b
glad I could help 🙂
🙌 1