You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to use Vitest together with Astro and saw that there is already an example directly within this repository that is based on pull request #4154. So I installed vitest and created a vitest.config.ts that looks like this:
matthewp
added
- P5: urgent
Fix build-breaking bugs affecting most users, should be released ASAP (priority)
and removed
- P3: minor bug
An edge case that only affects very specific usage (priority)
labels
Oct 7, 2022
What version of
astro
are you using?1.3.1
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
I wanted to use Vitest together with
Astro
and saw that there is already an example directly within this repository that is based on pull request #4154. So I installed vitest and created avitest.config.ts
that looks like this:But when I try to execute
vitest
I'm getting the error$ npx vitest Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/me/project/node_modules/astro/dist/core/config.js' imported from /Users/me/project/node_modules/astro/config.mjs
The issue is that https://github.com/withastro/astro/blob/24bad5a0ad6e3b64d9209aecffd8d0e9181135ad/packages/astro/config.mjs is importing
./dist/core/config.js
which does not exist. The correct path would be./dist/core/config/config.js
. I tried to change that locally in mynode_modules
directory but then I'm gettingSo the whole
settings
object here https://github.com/withastro/astro/blob/24bad5a0ad6e3b64d9209aecffd8d0e9181135ad/packages/astro/src/integrations/index.ts isundefined
.Link to Minimal Reproducible Example
https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-vitest
Participation
The text was updated successfully, but these errors were encountered: