You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the Supabase and I tried adding your package to their Edge functions (server-side TypeScript functions). Edge Functions are developed using Deno.
It seems there are problems with running this on Deno.
Here is what I see in logs when I try to run yahoo-finance:
⚠️ WARNING! This package (i.e. `yahoo-finance2`) is being used in the browser. Trying to use this may not work because of CORS. Be aware of that (and don't file issues for help with that). You can use a proxy to make CORS errors disappear, but we will not help you with that. Please read the README (https://github.com/gadicc/node-yahoo-finance2) for more details.
err TypeError: p.headers.raw is not a function
at pe (https://esm.sh/v135/[email protected]/esnext/yahoo-finance2.mjs:3:4675)
at eventLoopTick (ext:core/01_core.js:64:7)
at async Object.Ie [as _fetch] (https://esm.sh/v135/[email protected]/esnext/yahoo-finance2.mjs:3:8861)
at async Object.We [as _moduleExec] (https://esm.sh/v135/[email protected]/esnext/yahoo-finance2.mjs:27:666)
at async Object.x [as quote] (https://esm.sh/v135/[email protected]/esnext/yahoo-finance2.mjs:27:7503)
at async getQuotesByTickerSymbols
Just confirming from my own work, this is related to the use of node-fetch which has weird/non-standard around headers. My PR #793 will drop node-fetch in favour of the Node18 stdlib implementation which should resolve this issue. Can't guarantee this package will magically support Deno after that, but there's a pretty good chance it will
Bug Report
Describe the bug
I'm using the Supabase and I tried adding your package to their Edge functions (server-side TypeScript functions). Edge Functions are developed using Deno.
It seems there are problems with running this on Deno.
Here is what I see in logs when I try to run yahoo-finance:
Minimal Reproduction
Environment
Browser or Node: Deno
Node version (if applicable):
Npm version:
Browser verion (if applicable):
Library version (e.g.
1.10.1
): 2.11.3Additional Context
Any idea is it possible to run on Deno?
The text was updated successfully, but these errors were encountered: