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.

Assessment

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

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.

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

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

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.

More from typesense/typesense-js

All issues in typesense/typesense-js

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.