-
Notifications
You must be signed in to change notification settings - Fork 301
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
Can't build with Astro #3206
Comments
Potentially related ticket: #3155 |
I was able to reproduce the same build error. However, a workaround is setting the ssr.noexternal config change in
I confirmed that this fixes this issue using your demo repo. This tells vite not to externalize Amplify UI packages. Please let me know if this fixes your issue. We are working on updating our ES module exports to make this unnecessary in the future. |
@reesscot Thank you for the workaround! It looks working along with another workaround: aws/aws-sdk-js#3673 (comment) Here is the commit and I can login to Cognito using Amplify UI with Astro SSR on Node.js: opsbr/demo-amplify-ui-astro@1d56947 |
Actually, one more change was needed for |
Closing in favor of tracking the underlying issue in #3155 |
The ESM fix has been released in
The workaround should no longer be needed. |
This solution worked for me, edit
Orginal answer can be found here |
@bilal-korir Can you share what parts of Amplify you are using? Maybe we need to add a general troubleshooting section for Astro in the documentation. |
Hi @reesscot, the services I use within Amplify are, GraphQL API, Cognito, S3, and hosting. Here is a screenshot of the error from the console: Tapping into
Tapping into
Thank you, hope this info could help. |
@bilal-korir I've added a section to our troubleshooting guide for Astro: #3410 |
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
React
Which UI component?
Authenticator
How is your app built?
Astro (using Vite under the hood for build)
What browsers are you seeing the problem on?
No response
Please describe your bug.
I just tried to experiment Amplify UI with Astro but couldn't build
withAuthenticator
by the error below:What's the expected behaviour?
No error during
npm run build
Help us reproduce the bug!
Try https://github.com/opsbr/demo-amplify-ui-astro
Code Snippet
See https://github.com/opsbr/demo-amplify-ui-astro
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: