Skip to content

Error: this.agent.request is not a function #28

@mrturck

Description

@mrturck

Hello I am getting this error when using the Typescript SDK, full error below

Error processing source: 174 |     }
175 | }
176 | /** An error class for errors returned by the turbopuffer API. */
177 | class TurbopufferError extends Error {
178 |     constructor(error, { status, cause }) {
179 |         super(error, { cause: cause });
              ^
error: fetch failed: this.agent.request is not a function. (In 'this.agent.request({
            origin: this.origin,
            path,
            method,
            headers,
            body: requestBody
          })', 'this.agent.request' is undefined)
      at new TurbopufferError (/Users/mturck/wxr/worker/node_modules/@turbopuffer/turbopuffer/dist/httpClient.js:179:9)
      at /Users/mturck/wxr/worker/node_modules/@turbopuffer/turbopuffer/dist/httpClient.js:109:33

86 |         let response_start;
87 |         for (let attempt = 0; attempt < maxAttempts; attempt++) {
88 |             error = null;
89 |             request_start = performance.now();
90 |             try {
91 |                 response = await this.agent.request({

Details:

  • Running on local machine in Node/express environment
  • Following the code on https://turbopuffer.com/docs/quickstart with my own embeddings
  • Embeddings created with OpenAI (256 dims), a few small attributes for each embedding)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions