Skip to content
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

[Bug]: Select does not work in Next.js v13 #785

Closed
2 tasks done
MasahiroKanatani opened this issue Feb 24, 2023 · 5 comments
Closed
2 tasks done

[Bug]: Select does not work in Next.js v13 #785

MasahiroKanatani opened this issue Feb 24, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@MasahiroKanatani
Copy link

Browser

Chrome

Package version

v3.0.206

React version

v18.2.0

Description

Hello. I am using Cloudscape with Next.js v13.
When I build and launch it with the Select component invoked and click on the Select box, I get the following error in the Developer Tool console.
(The error does not occur if I start the program in development mode).

TypeError: Cannot read properties of undefined (reading '__labelPrefix')

Source code

Sample project is here.
https://github.com/MasahiroKanatani/next13-cloudscape-minimum

Reproduction

No response

Code of Conduct

@MasahiroKanatani MasahiroKanatani added the bug Something isn't working label Feb 24, 2023
@MasahiroKanatani
Copy link
Author

Setting swcMinify: false in next.config.js worked as expected.

@russell-tarpley
Copy link

I ran into the same issue yesterday working with the PropertyFilter component. The issue appears in functionality for select related to aria strings.

When built in nextjs for production this function appears broken as the undefined is related to a variable that is never set.
image

However everything is as you would expect unminified/optimized when running in development

@Al-Dani
Copy link
Member

Al-Dani commented Feb 27, 2023

Hey @MasahiroKanatani ,
Thank you for reaching out!
We will take a look into this error.

@just-boris
Copy link
Member

just-boris commented Mar 2, 2023

This looks like a bug in SWC compiler: swc-project/swc#7004

Until the issue is fixed, stick to swcMinify: false option

@just-boris
Copy link
Member

Closing because the upstream issue is resolved.

Please watch next js release notes to see an update. Note that they lock SWC version they use, so you may need to open an issue in the next.js repo too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants