-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Amplify is totally crashed because of the Window is not defined error in youtube-iframe package #3506
Comments
We're also experiencing this - we're using amplify as the basis for a nodejs SDK we're building, and upgrading from 1.1.27 to 1.1.29 produces this error for this. To add insult to injury, there's no changelog to be found, so it wasn't clear what caused this without looking into the codebase!
Edit: I can confirm that reverting to 1.1.28 resolves this issue for us. |
amplify-js is specifically a client / mobile / web library and does not have official support for node.js. For the iframe issue, we are aware of an issue/bug in analytics that should fix this in: https://www.npmjs.com/package/@aws-amplify/analytics/v/1.2.18-unstable.0 @svenkatesh-nyros can you give this version a try and see if this fixes your issue. We will review this and make sure we add this case to our integration tests. On the subject of node.js, we can add some documentation around how to get things working properly in node (via isomorphic fetch etc.), but at the moment our team efforts are focused on mobile/web client use cases. We are however investigating node support specifically for SSR. |
@mlabieniec we ended up stripping out all of amplify and replacing it with just |
Due to Amplify's stated goal of SSR compatibility, we assumed that no new server-breaking changes would be added to the codebase. While Amplify might not yet officially support SSR, can there please at least be a moratorium on new server-side-breaking code? At the very least, a moratorium on new code that breaks the server at import-time of the package that contains that piece of code, even if some pieces of Amplify won't properly execute on the server? For anybody with this problem, my resolution for similar issues with this package was to dynamically import amplify on the client side via a dynamic import in |
@mlabieniec understanding of the mobile/web focus, however e.g. |
@mlabieniec issue still exists on |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
@powerful23, @robbevan ,@mlabieniec, @jordanranz, @mbahar, @richardzcode
After installation of the @aws-amplify with the additional package of youtube-iframe.
Getting the error of window is not defined in
Can you please provide the previous working version without facing the issue of window is not defined in the following folders.
The text was updated successfully, but these errors were encountered: