Closed aminya closed 10 months ago
I am having the exact same vitest error. I also believe it's caused by the solid-start-file-system-router
plugin.
I have written this little hack to skip the plugin in tests:
import node from "solid-start-node";
import solid from "solid-start/vite";
import { defineConfig } from "vite";
let solidPlugins = solid({ adapter: node(), inspect: false });
solidPlugins = solidPlugins.filter((plugin) => {
switch (plugin.name) {
case "solid-start-file-system-router":
plugin.configureServer = () => undefined;
return plugin;
default:
return plugin;
}
});
export default defineConfig({
plugins: [solidPlugins],
});
Which node version are you using?
I am using the latest LTS version at this time.
node -v
v18.16.0
I have the same issue if I use any newer version of vitest. It works correctly with vitest ^0.26.3
.
In setting up for SolidStarts next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed by mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience. See https://github.com/solidjs/solid-start/pull/1139 for more details.
When using the
solid-start/vite
plugin inside Vitest, I get this error:I tried many different configurations, but it didn't help. I wonder what is happening here.
vitest.config.test
where
vitest.config.setup.ts
is