Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access "fs.ReadStream" in client code. #15

Open
FrancescoMussi opened this issue Aug 16, 2022 · 0 comments
Open

Cannot access "fs.ReadStream" in client code. #15

FrancescoMussi opened this issue Aug 16, 2022 · 0 comments

Comments

@FrancescoMussi
Copy link

I am trying to set it up.
Following the docs with basic example.

import * as finnhub from 'finnhub'
const api_key = finnhub.ApiClient.instance.authentications['api_key'];
api_key.apiKey = "my_api_key"
const finnhubClient = new finnhub.DefaultApi()

finnhubClient.stockCandles("AAPL", "D", 1590988249, 1591852249, (error, data, response) => {
    console.log(data)
});

I keep getting the following error:

Uncaught Error: Module "fs" has been externalized for browser compatibility. Cannot access "fs.ReadStream" in client code.

Same error with other api calls (symbolSearch, stockSymbols ...)

Do you know why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant