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

ERR_UNSUPPORTED_DIR_IMPORT or EISDIR with vitest #2172

Open
andreialecu opened this issue Feb 3, 2024 · 1 comment
Open

ERR_UNSUPPORTED_DIR_IMPORT or EISDIR with vitest #2172

andreialecu opened this issue Feb 3, 2024 · 1 comment

Comments

@andreialecu
Copy link

andreialecu commented Feb 3, 2024

Describe the bug

It appears that when using vitest via https://analogjs.org/docs/features/testing/vitest the test suite will run into bizarre issues due to the way this library imports @apollo/client/core.

I'm not sure if it's a bug in this library or in vite/vitest. I also opened a bug report on their side:
vitejs/vite#15795

To Reproduce

Repro at: https://stackblitz.com/~/edit/vitest-dev-vitest-djnid1?initialPath=/__vitest__/

Expected behavior

No error

@andreialecu
Copy link
Author

It appears the "correct" way is to change all the imports to @apollo/client/core/index.js as per: apollographql/apollo-client#11570 (comment)

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

1 participant