-
-
Notifications
You must be signed in to change notification settings - Fork 1.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 to run with browser mode, displaying a blank screen #3434
Comments
I don't think that the browser mode's contributors have run their codes practically. This mode never run correctly on my machine after it provides. |
There is a test for a browser mode that is used to test this feature manually, and it also runs in CI. There is no reason to blame anyone. If you don't have anything constructive to say, just don't say anything. |
Getting the same trying to set up vitest. The following is thrown in the test browser console:
|
The minimal reproduction case here works if you install |
Thanks. Installing that utils package made it run for me. |
Installing vitest utils doesn't work for me 🤷🏻♂️ |
Hey team 👋🏻 I haven't written any tests since I encoutered this issue (maybe a month). Is this planned anytime soon? This will help me decide should I move to jsdom & disable browser mode. Thanks. |
In
Now browser mode is trying to load CJS version of The 'use strict';
Object.defineProperty(exports, '__esModule', {
// ^^^^^^^^
// ReferenceError: exports is not defined
value: true
});
exports.default = exports.DEFAULT_OPTIONS = void 0;
exports.format = format;
exports.plugins = void 0;
var _ansiStyles = _interopRequireDefault(require('ansi-styles'));
... This cannot be reproduced in Vitest monorepo but using the packages in separate project always runs into this. Installing |
I have the exact same error but installing |
This is fixed and released in |
Sadly those are the versions installed on my side with the bug still ocurring
|
@NathanVss can you provide a minimal repro using yarn? |
Came here because I’ve installed vitest into a fresh vite project and can’t run any test: |
Add this two dependencies to project "pretty-format": "^29.5.0",
"diff-sequences": "^29.4.3" I'm using vitest Without
Without
This only happens while I'm adding vitest to an existing project (that project is using yarn). If I start a new project, It seems there's no any issue. So I think maybe It's something related to dependencies' version. |
Describe the bug
Running
vitest
results in the following error in browser console:Only a blank white page is displayed.
Reproduction
npm install
npx vitest
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: