-
Notifications
You must be signed in to change notification settings - Fork 7
Examples Don't Work #49
Comments
Hello! Thanks for posting an issue. I am more than happy to help here! First off, I assume you ran the sample code that you pasted into a TS or JS file, and the reason you're seeing that error message is because by default Node.js environment does not allow you to use Now, having said that, chances are even after taking either approach above, you will still see an error saying the module was not found. This is because the Transport was built modular so depending on your build system (e.g. Webpack) you can benefit from tree shaking. However, this means the free-standing sample code as shown above cannot be used as-is where you import only the necessary pieces and leave the module wiring part incomplete. Instead, what you need is the UMD module which we also provide alongside TS counterparts. Check it out here As for the correct instructions with the UMD module, you can refer to this section of the README, or check out the StackBlitz demo. As an alternative, if you are using Angular as your front-end application framework (or React or any other frameworks), chances are the Also, I acknowledge that the README is a bit unclear on the assumptions and prerequisites that I just described above, and we'll make sure to update the contents to be as clear as possible. Thanks and let me know if you have further problems! |
We're working on our documentation updating things and adding ready to run examples that should work out of the box. Thank you for pointing this out and helping us get better. |
We have updated our examples and documentation on getting up and running. We also added runnable examples via StackBlitz. Please check them out and let us know what you think. Importing via ES6 |
Hey,
I tried to use your project, it's very promising.
I ran into issued with typescript, tried many things to resolve it but it seems there is an issue with your project.
Here is the code:
I'll share the error below, please let me know how I can fix it.
The text was updated successfully, but these errors were encountered: