vitest complains that “require is not defined” but I don’t use require
Summary The issue at hand is that vitest is throwing a ReferenceError complaining that require is not defined in an ES module scope, even though the test file does not explicitly use require. This error is confusing because the test file is written using ES module syntax and the package.json file does not have a … Read more