awslabs / amazon-kinesis-video-streams-webrtc-sdk-js

JS SDK for interfacing with the Amazon Kinesis Video Streams Signaling Service.
https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-js/examples/index.html
Apache License 2.0
288 stars 145 forks source link

Can't import the named export 'Crypto' from non EcmaScript module, Gatsby #137

Closed stazcp closed 3 years ago

stazcp commented 3 years ago

So code works fine when running gatsby on develop but when I run build I get this issue.

Can't import the named export 'Crypto' from non-EcmaScript module

At #55 there is a solution providing the pkg with a Lambda layer. I also found that packages can be imported as a script? https://www.gatsbyjs.com/plugins/gatsby-plugin-load-script/

Any recommendations for Gatsby users? What workarounds do you recommend?

stazcp commented 3 years ago

Solution: Imported script conditionally instead of installing the SDK.