alpacahq / alpaca-ts

A TypeScript Node.js library for the https://alpaca.markets REST API and WebSocket streams.
ISC License
154 stars 42 forks source link

NodeError: Must use import to load ES Module #22

Closed ehab180hb closed 3 years ago

ehab180hb commented 3 years ago

So the code doesn't work, since the it build into "ESNEXT" according to https://github.com/117/alpaca/blob/master/tsconfig.json You're using the export from syntax which is not supported by the latest version of node yet.

Try it here: https://runkit.com/ehab180hb/5f9f225f041987001aafe129

117 commented 3 years ago

I have this fixed in the latest version v2.1.3. Let me know if this resolves the issue. 🙂

ehab180hb commented 3 years ago

Works like a charm, thanks!