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

Component Dialog breaks the production build #1655

Closed
Zaid-maker opened this issue Oct 2, 2023 · 5 comments
Closed

Component Dialog breaks the production build #1655

Zaid-maker opened this issue Oct 2, 2023 · 5 comments

Comments

@Zaid-maker
Copy link

i am getting this error when try to deploy my app it was working perfectly and when i add sheet component it breaks my app and giving this error, i tried delete and install the component as well but still didn't work

image

image

@Zaid-maker
Copy link
Author

Zaid-maker commented Oct 2, 2023

its working fine in dev mode but not in production

Edit: PR #1635 fix my issue, edit the component manually and production builds without any errors

@aashahin
Copy link

aashahin commented Oct 2, 2023

The solution is to delete the code lines in the picture and put this instead
const DialogPortal = DialogPrimitive.Portal;

@kanakkholwal
Copy link

This issue is exclusive with @radix-ui/react-alert-dialog version 1.0.5. What you can do is . delete your package-lock.json and change "@radix-ui/react-dialog": "^1.0.5", and "@radix-ui/react-alert-dialog": "^1.0.5" to

    "@radix-ui/react-alert-dialog": "1.0.4",
    "@radix-ui/react-dialog": "1.0.4",

Then run npm install

@Zaid-maker
Copy link
Author

This issue is exclusive with @radix-ui/react-alert-dialog version 1.0.5. What you can do is . delete your package-lock.json and change "@radix-ui/react-dialog": "^1.0.5", and "@radix-ui/react-alert-dialog": "^1.0.5" to

    "@radix-ui/react-alert-dialog": "1.0.4",
    "@radix-ui/react-dialog": "1.0.4",

Then run npm install

OK I will give it a try

@Zaid-maker
Copy link
Author

The solution is to delete the code lines in the picture and put this instead const DialogPortal = DialogPrimitive.Portal;

Yup, that's what exactly I do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants