vitest error

I was writing some tests yesterday using vitest which I have had set up for a long time. Everything was working fine and then all of a sudden I started getting this error from the framework (see image). I can't find anything about this error online and I didnt change my vitest config at all. Anyone have any ideas what's going on?
// vite.config.ts
import { defineConfig } from "vitest/config";
import { loadEnvConfig } from "@next/env";

export default defineConfig(() => {
loadEnvConfig(process.cwd());

return {
test: {
environment: "node",
globalSetup: "./test/global-setup-teardown.ts",
coverage: {
reporter: ["text", "json", "html"],
},
},
};
});
// vite.config.ts
import { defineConfig } from "vitest/config";
import { loadEnvConfig } from "@next/env";

export default defineConfig(() => {
loadEnvConfig(process.cwd());

return {
test: {
environment: "node",
globalSetup: "./test/global-setup-teardown.ts",
coverage: {
reporter: ["text", "json", "html"],
},
},
};
});
1 Reply
Tom
TomOP2y ago
I tried deleting node_modules and redoing npm install I also tried rebooting, for the record In case anyone else sees this. You cannot import vi for vitest froma. global setup / cleanup file
Want results from more Discord servers?
Add your server