ES Importing PineconeClient returns [TypeError: Cannot read properties of undefined (reading 'match')] running Jasmine tests

On my Node.js app I have installed @pinecone-database/pinecone@0.0.10 along with langchain, whenever I have PineconeClient imported, Jasmine tests fail reporting: [TypeError: Cannot read properties of undefined (reading 'match')]. When I comment out the import statement my tests just run fine.

Has anyone fixed this error?


  1. In Node.js environment: install -S dotenv langchain @pinecone-database/pinecone jasmine
  2. In package.json add: "type": "module"
  3. Initialize Jasmine: npx jasmine init
  4. Create a .js file to import PineconeClient: touch test.js
  5. In test.js import PineconeClient: import { PineconeClient } from "@pinecone-database/pinecone"; inside test.js:
// test.js
import { PineconeClient } from "@pinecone-database/pinecone";
export async function foo() {
  1. Create test.spec.js in specs/ :
// test.spec.js
import { foo } from '../test.js'

describe('test', () => {
  it('does something', async () => {
  1. run npx jasmine

Hi @jnum - sorry for the late reply. This issue has been solved in the latest major release of the client. Please note that you should import the new client as shown below:

import { Pinecone } from "@pinecone-database/pinecone";