Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

cross-fetch in the JavaScript driver doesn't seem to work everywhere #179

Closed
penberg opened this issue Feb 9, 2023 · 2 comments
Closed
Labels
bug Something isn't working client-lib-js

Comments

@penberg
Copy link
Contributor

penberg commented Feb 9, 2023

We've had multiple people point out that they had to switch to native fetch() because of some cross-fetch issue.

@penberg penberg added bug Something isn't working client-lib-js labels Feb 9, 2023
@penberg
Copy link
Contributor Author

penberg commented Feb 9, 2023

Looks like this cross-fetch just ignores native fetch: lquixada/cross-fetch#69

@CodingDoug
Copy link
Contributor

CodingDoug commented Feb 9, 2023

I think we can keep using cross-fetch, but don't import it as fetch (which masks the native fetch). Then, check to see if there is a native fetch to use before falling back to cross-fetch.

Alternatively, this might work in the future: lquixada/cross-fetch#138 (comment)

bors bot added a commit that referenced this issue Feb 17, 2023
181: JS client: use native fetch when available. r=BearLemma a=BearLemma

Might be fixing #179 
Needs testing though.

Co-authored-by: Jan Plhak <[email protected]>
MarinPostma pushed a commit to tursodatabase/libsql that referenced this issue Oct 17, 2023
181: JS client: use native fetch when available. r=BearLemma a=BearLemma

Might be fixing libsql/sqld#179 
Needs testing though.

Co-authored-by: Jan Plhak <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working client-lib-js
Projects
None yet
Development

No branches or pull requests

2 participants