The is present in the pinecone.ts
import { PineconeClient } from '@pinecone-database/pinecone'
export const getPineconeClient = async () => {
const client = new PineconeClient()
await client.init({
apiKey: process.env.PINECONE_API_KEY!,
environment: 'gcp-starter',
})
return client
}
core.ts (where I want to use Pinecone Client)
const pinecone = await PineconeClient() // this also giving error
const pineconeIndex = pinecone.Index('name')
2
Answers
I’m getting almost the same error:
Module ‘"@pinecone-database/pinecone"’ has no exported member ‘PineconeClient’.ts(2305)
Please check your @pinecone-database/pinecone library version, because from v1.1.0 they removed PineconeClient.
following is the updated way of creating pincone client,
You can refer following link for the same:
https://docs.pinecone.io/legacy/getting-started/quickstart
Please try this solution, if you still find an error let me know.