Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinecone not working with bun run index.ts #16580

Open
ansh opened this issue Jan 21, 2025 · 0 comments
Open

Pinecone not working with bun run index.ts #16580

ansh opened this issue Jan 21, 2025 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@ansh
Copy link

ansh commented Jan 21, 2025

What version of Bun is running?

1.1.45+196621f25

What platform is your computer?

Darwin 24.2.0 arm64 arm

What steps can reproduce the bug?

Install @pinecone-database/pinecone and then do some Pinecone stuff like this

import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone();

await pc.createIndex({
  name: 'sample-index',
  dimension: 1536,
  spec: {
    serverless: {
      cloud: 'aws',
      region: 'us-west-2',
    },
  },
  tags: { team: 'data-science' },
});

It throws an error:

❯ bun index.js
{
  obj: "",
  type: "string"
}
502 |                     case 0:
503 |                         const t = this.raw.text();
504 |                         _a = this.transformer;
505 |                         return [4 /*yield*/, t
506 |                           .then(t => JSON.parse(t))
507 |                           .catch(e => {
                                          ^
SyntaxError: JSON Parse error: Unexpected EOF
      at /Users/erhant/fb/tmp/pinecone-bug/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/runtime.js:507:38

Steps To Reproduce
Install pinecone package and create a file with the snippet given above.
Run it with node and confirm it works.
Run it with bun and confirm it throws an error.

What is the expected behavior?

It should work

What do you see instead?

No response

Additional information

Related issue: pinecone-io/pinecone-ts-client#141

@ansh ansh added bug Something isn't working needs triage labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant