-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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 fails after SvelteKit Update: Cannot find package '__sveltekit' #9162
Comments
Hi there, I've got the same problem and also created a repository to prepare an issue: https://github.com/nilsroehrig/sveltekit-import-problem. In my case it happens when the code under test imports
Upgrading to Steps to reproduce
|
@benmccann I believe this is related to one of the recent changes (#9022), which I thought would increase interop with things like Vitest? |
This |
It turns out that Vitest doesn't use Vite itself, but |
Are you sure? Would it be lots of work? Cause from my experience, |
test: {
environment: `jsdom`,
css: true,
coverage: {
reporter: [`text`, `json-summary`],
},
+ deps: {
+ inline: [`@sveltejs/kit`],
+ },
}, raises
|
downgrade svelte-kit to 1.3.10 to fix vitest error (see sveltejs/kit/issues/9162) update logo to match new package name Elementari add copyright to footer
downgrade svelte-kit to 1.3.10 to fix vitest error (see sveltejs/kit/issues/9162) update logo to match new package name Elementari add copyright to footer
downgrade svelte-kit to 1.3.10 to fix vitest error (see sveltejs/kit/issues/9162) update logo to match new package name Elementari add copyright to footer
It does help, but it only fixes one of two bugs that are present. The original bug report here had:
The issue there is that vitest doesn't resolve the When you set it you get the slightly different error message:
That's because you're now encountering the second issue. #8957 introduced a I don't know if there's a workaround on the user side right now, but we'll get it fixed this week |
I have a svelte-kit project that uses a mono repo structure with lerna and yarn workspaces. Using svelte-kit version 1.5 works wonderfully, but 1.8.5 and 1.8.6 both spit out the: |
I am still facing this issue after moving to version 1.9.1 from 1.7.2
|
The virtual module uses optional chaining now:
|
Thanks y'all! Problem solved. 😄 |
Describe the bug
If I try to update our project from SvelteKit 1.3.10 to the latest version 1.8.3, our Vitest unit tests are failing with a kind of strange error.
Reproduction
I created a minimal reproduction repo based on a create-svelte project. https://github.com/vekunz/sveltekit-vitest-error
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: