typesense / typesense/typesense-js

typesense-js crashes on Cloudflare Workers due to axios@1.20.0 - Unsupported cache mode: default

Open Beginner friendly
#369 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
569
Forks
99
Avg merge
5h 6m
Merged PRs (30d)
2

Description

Because typesense specifies "axios": "^1.15.0", recent installs pull axios@1.20.0. In 1.20.0, Axios's fetch adapter injects cache: 'default' into new Request(), which causes Cloudflare Workers (workerd) to throw TypeError: Unsupported cache mode: default. Please consider pinning Axios to <1.20.0 or providing a native fetch adapter

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking the package's axios dependency and the Axios fetch adapter behavior in a Cloudflare Workers (workerd) environment. Reproduce the "Unsupported cache mode: default" error with axios@1.20.0, then verify that the chosen compatibility change prevents the crash without breaking the client.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.