Initializing the client

Hi. I am trying to initialize the client using this code
import { Pinecone } from ‘@pinecone-database/pinecone’;

const pc = new Pinecone({
apiKey: '********-***-
});

but I get an error message in my Command Prompt - ‘import’ is not recognized as an internal or external command, operable program or batch file. How do I fix that?

Hi @anamyers03, and welcome to the Pinecone community forums!

Thank you for your question.

It sounds like you may be typing your program into a command line prompt, whereas typically, you’d want to write that to a file that ends in .js and run it with node.

You can find the installation instructions for Node here, but be sure to specify your correct environment.

Once you’ve successfully installed node, you’re going to want to get the full path to the file containing your code and run it like this:

$ node your-program.js

Hope that helps!

Best,
Zack