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

NestJS--> TypeError: alpaca_trade_api_1.default is not a constructor #186

Open
en-ahsanali opened this issue Jan 16, 2022 · 2 comments
Open

Comments

@en-ahsanali
Copy link

en-ahsanali commented Jan 16, 2022

const alpaca =new Alpaca({ keyId: 'API_KEY', secretKey: 'SECRET' })
const websocket=alpaca.data_stream_v2

@en-ahsanali
Copy link
Author

Using Nestjs, and after connecting it. I tried accessing the websocket, and giving me this error. It is working fine on Nodejs

@MaherNajar
Copy link

Add this compiler option in tsconfig.json
{
"compilerOptions": {
"esModuleInterop": true
}
}

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

2 participants