-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Describe the bug
Running "npx vitest run" results in a Node error that repro's about half the time. Usually, all the tests are reported as passing before Node spits out this error. The error appears for me locally on Windows 10, but also causes our Linux (Ubuntu) CI build to fail. My viteconfig file is pretty vanilla, the only slightly abnormal thing I'm using is scss additionalData. I am trying my best to get a sandboxed reproduction, but this is for a corporate project so I am unable to share my full repo. I understand that a full sandbox is required for the bug to be addressed, but I am desperate and confused, and am hoping someone might be able to at least point me in the right direction. I love vite and vitest and this is the last thing preventing me from getting my team onto it.
Below is the output I am seeing:
√ src/scenes/App/advanced-reporting/advanced-reporting-list-view/advanced-reporting-list-view.test.tsx (2 tests) 443ms
√ src/components/create-quick-topic-report-modal/create-quick-topic-report-modal.test.tsx (5 tests) 949ms
√ src/components/workplace-reactions-aggregate-card/workplace-reactions-aggregate-card.test.tsx (10 tests ) 1002ms
FATAL ERROR: v8::FromJust Maybe value is Nothing.
Test Files 6 passed (6)
Tests 33 passed (33)
Time 17.04s (in thread 2.95s, 577.09%)
1: 00007FF60749815F v8::internal::CodeObjectRegistry::~CodeObjectRegistry+114079
2: 00007FF6074254C6 DSA_meth_get_flags+65542
3: 00007FF60742637D node::OnFatalError+301
4: 00007FF607D46415 v8::V8::FromJustIsNothing+53
5: 00007FF6073423FA v8::internal::MicrotaskQueue::microtasks_policy+22170
6: 00007FF60734229D v8::internal::MicrotaskQueue::microtasks_policy+21821
7: 00007FF6072B2BAD v8::internal::OrderedHashTablev8::internal::OrderedNameDictionary,3::NextTableOffset +58157
8: 00007FF6072B0623 v8::internal::OrderedHashTablev8::internal::OrderedNameDictionary,3::NextTableOffset +48547
9: 00007FF6072B37CD v8::internal::OrderedHashTablev8::internal::OrderedNameDictionary,3::NextTableOffset +61261
10: 00007FF6074962E5 v8::internal::CodeObjectRegistry::~CodeObjectRegistry+106277
11: 00007FF60747E899 v8::internal::CodeObjectRegistry::~CodeObjectRegistry+9433
12: 00007FF6074EC4A8 uv_check_init+120
13: 00007FF6074F7168 uv_run+664
14: 00007FF6074C5E05 node::SpinEventLoop+309
15: 00007FF60735DEC0 v8::internal::interpreter::BytecodeLabel::bind+35776
16: 00007FF607359518 v8::internal::interpreter::BytecodeLabel::bind+16920
17: 00007FF6074E766D uv_poll_stop+557
18: 00007FF608300940 v8::internal::compiler::RepresentationChanger::Uint32OverflowOperatorFor+146416
19: 00007FFD49347034 BaseThreadInitThunk+20
20: 00007FFD4A282651 RtlUserThreadStart+33
Reproduction
run "npx vite run" on Windows 10 with the following vite config (changing scss additional data to pull in a scss file of your choosing)
///
import { defineConfig, splitVendorChunkPlugin } from "vite";
import { inspectorServer } from "react-dev-inspector/plugins/vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
test: {
globals: true,
environment: "jsdom",
},
plugins: [
react(),
splitVendorChunkPlugin(),
],
css: {
preprocessorOptions: {
scss: {
additionalData: @use "sass:math"; @import "scss/_aw-tools-and-vars-complete";
}
}
},
server: {
port: 8080,
strictPort: true,
},
build: {
sourcemap: true,
}
}
);
System Info
System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 13.13 GB / 31.83 GB
Binaries:
Node: 16.14.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.5.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 100.0.4896.127
Edge: Spartan (44.19041.1266.0), Chromium (100.0.1185.50)
Internet Explorer: 11.0.19041.1202
npmPackages:
@vitejs/plugin-react: 1.3.1 => 1.3.1
vite: 2.9.5 => 2.9.5
vitest: 0.10.0 => 0.10.0Used Package Manager
yarn
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.