IBM / ibm-generative-ai-node-sdk

Library that provides convenient access to the Generative AI API from Node.js applications
MIT License
35 stars 6 forks source link

Add TypeScript paths for exports #24

Closed Tomas2D closed 1 year ago

Tomas2D commented 1 year ago

If the TypeScript client with moduleResolution is different then Node16/NodeNext in tsconfig.json tries to do the following import:

import { GenAIModel } from '@ibm-generative-ai/node-sdk/langchain'

The following error occurs "Module not found" even if the client can handle the sub-directory import (Node 12+).

This can be solved by adding typesVersions field to the package.json.

Tomas2D commented 1 year ago

Released in 1.2.0