-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Error in Vitest with Astro (No "exports" main defined
)
#328
Comments
So the issue is either in Also not sure what is wrong with that |
I also struggled with it. I guess it's the problem of ESM/CJS compatibility... |
Seeing the same issue in an Astro project when importing
|
Might be related to or duplicate of #290. |
🚀 This issue has been resolved in v2.41.2. See Release 2.41.2 for release notes. |
I confirmed that the issue is resolved. Thank you so much!!! |
What happens
When I run
npm knip
withvitest.config.js
with Astro integration, I get an errorNo "exports" main defined in repo\node_modules\tsconfck\package.json
.I tried to look into the problem but could not solve it. The cause is the
jiti
of loading Astro's dependencytsconfck
.I appreciate it if you could fix this issue, but please ignore it if it is difficult to resolve.
Versions
Node.js v21.1.0
npm 10.2.0
knip: 2.38.6
astro: 3.4.2
vitest: 0.34.6
* All are the latest
Reproduction steps
The minimum reproduction repo is here. Just run
npm i
andnpx knip
.I checked the reproduction both in Windows and Linux.
Error log
Workaround
Add
vitest: false
toknip.ts
The text was updated successfully, but these errors were encountered: