-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[React] Vite can't resolve the entries for the package #934
Comments
What version of Vite are you using? |
@thecrypticace version 4.0.3 |
Faced the same issue today using Vite 4.1.1. Can confirm that adding a default export for |
Can you tell me what your imports and Vite config look like? I am unable to reproduce this problem. (I will note that you cannot import from @Guipsss @vskolos Also is there any chance either or both of you could provide reproduction repos? |
Ah I think I've figured out what the issue is — this isn't a new problem at all but just an issue with the way optimizeDeps works in Vite. Working on a fix! |
The error message suggests that the package @heroicons/react is missing a default export, which can be fixed by adding one in its package.json file. To fix this error, you can follow these steps:
This should download the latest version of the package, including the newly added default export. |
@thecrypticace awesome. |
@thecrypticace yes, it's fixed using the insiders build. |
@Guipsss excellent — thanks for the confirmation! I've published v2.0.16 with the fix. |
@thecrypticace awesome. Thank you so much! |
I'm getting this error when trying to run my application after installing the package.
Adding a default export for
.
, as shown bellow, fixes it.The text was updated successfully, but these errors were encountered: