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
Create a library in a sveltekit project which includes this import:
import { env } from "$env/dynamic/private";
Add a test that imports this module and run that test, you will see an error like this:
error: Cannot find module "$env/dynamic/private" from "/path/to/repo/src/lib/server/env.ts"
Now, if you import that same module in a +page.server.ts file and load the corresponding page, it should load without issue.
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
Seems like this issue also existed in vitest a while back, but SvelteKit solved the problem with this PR.
Note that I'm also using workspaces in my project, so if the instructions above can't replicate the problem it may be related to that. I don't think so because I can still start the server and use the library that way, but always a possibility.
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.1.6+e58d67b46
What platform is your computer?
Linux 6.5.0-28-generic x86_64 x86_64
What steps can reproduce the bug?
Create a library in a sveltekit project which includes this import:
Add a test that imports this module and run that test, you will see an error like this:
Now, if you import that same module in a
+page.server.ts
file and load the corresponding page, it should load without issue.What is the expected behavior?
No response
What do you see instead?
No response
Additional information
Seems like this issue also existed in vitest a while back, but SvelteKit solved the problem with this PR.
Note that I'm also using workspaces in my project, so if the instructions above can't replicate the problem it may be related to that. I don't think so because I can still start the server and use the library that way, but always a possibility.
The text was updated successfully, but these errors were encountered: