What would I be getting this error when I run this code?

Code:

import { Pinecone } from ‘@pinecone-database/pinecone’;
const pinecone = new Pinecone({
apiKey: process.env.PINECONE_API_KEY,
environment: process.env.PINECONE_ENVIRONMENT,
});

const index = pinecone.index(‘test1’);

await index.deleteAll();

Error:

SyntaxError: Invalid or unexpected token
at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:119:18)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:468:14)
at async link (node:internal/modules/esm/module_job:68:21)

Oh I fixed it…

But now I get a deleteAll is not supported by the current index type “Starter”

So… How do I delete documents in the starter package? One by one on the site?? That is pretty painful.

Hi @Elindo586

the easiest way would be to delete the Index and create a new one :slight_smile: if you want to delete all of the documents in the Index.

Hope this helps

Edit: Also do help the Starter region documentation for more about limitations: gcp-starter environment :slight_smile:

3 Likes

If you want to keep the index the exact same and not have to re-setup a new Index each time which requires startup times, a couple of clicks, and config setup, you can reset your entire Index in a click with VectorAdmin (open-source vector database management tool).

Its under the tools section and works with all tiers of Pinecone. I had this same frustration at one point :joy:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.