anthropics / anthropic-sdk-typescript

Access to Anthropic's safety-first language model APIs

Home Page:https://www.npmjs.com/package/@anthropic-ai/sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This expression is not constructable has no construct signatures.ts(2351)

pytour opened this issue · comments

image

When i declare Anthropic getting error:
This expression is not constructable. Type 'typeof import(/node_modules/@anthropic-ai/sdk/build/src/index")' has no construct signatures.ts(2351)

Lib version "^0.4.0"
Running in nestjs 10.3.2

It seems you may be importing from the wrong place; make sure you're doing import Anthropic from '@anthropic-ai/sdk', not from '@anthropic-ai/sdk/build/src' or anything like that.

If that doesn't fix it, please share more details and we'll reopen.