import { Pinecone } from "@pinecone-database/pinecone";
async function initPinecone() {
try {
const pinecone = new Pinecone({
apiKey: process.env.PINECONE_API_KEY,
});
return pinecone;
} catch (error) {
console.log("error", error);
}
}
export const pinecone = await initPinecone();
Migrating to new Pinecone version “@pinecone-database/pinecone”: “^2.2.2”, in Next JS and keep getting error
TypeError: _pinecone_database_pinecone__WEBPACK_IMPORTED_MODULE_0__.Pinecone is not a constructor
Any help is appreciated, thanks.
1 post - 1 participant