如何创建松果客户端,它给出错误

问题描述 投票:0回答:1

存在于松果.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(我想在其中使用 Pinecone 客户端)

const pinecone = await PineconeClient() // this also giving error 
const pineconeIndex = pinecone.Index('name')
reactjs next.js pinecone
1个回答
0
投票

我遇到了几乎相同的错误:

模块“@pinecone-database/pinecone”没有导出成员“PineconeClient”.ts(2305)

© www.soinside.com 2019 - 2024. All rights reserved.