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

Vitest bug: "Error: ENOENT: no such file or directory" #763

Open
amorey opened this issue Apr 14, 2024 · 0 comments
Open

Vitest bug: "Error: ENOENT: no such file or directory" #763

amorey opened this issue Apr 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@amorey
Copy link

amorey commented Apr 14, 2024

When I run vitest with the miniflare environment I get a missing file error due to one of the build files not being present. Here's a minimal vite project that reproduces the error:
https://github.com/amorey/miniflare-vitest-bug

git clone git@github.com:amorey/miniflare-vitest-bug.git
cd miniflare-vitest-bug
pnpm install
pnpm test

In this particular example, the error is that the build artifact dist/main.cjs is missing. If I remove the "main" definition from package.json, the error goes away.

@RamIdeas RamIdeas added the bug Something isn't working label Apr 15, 2024
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
Status: Untriaged
Development

No branches or pull requests

2 participants