Possible issues with Vitest and Node version < 22.12.0 #13438
Stanaland-Michael-bah
started this conversation in
General
Replies: 1 comment
-
(Updated original post because I had some incorrect version numbers) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I haven't seen any other posts about this, so it may be just unique to our setup ... posting just in case this helps anyone else.
We just completed migrating an extremely large monorepo from v5 to v7. It took 352 days, was a ton of work, and we were beyond excited just to be DONE. But on the final step of replacing the v5-compat package with react-router-dom v7, Vitest in our CI started failing every micro-frontend with a million common errors like "You can't use useLocation outside of a router".
Since everything was good and passing locally, and the CI was happy when we were using react-router-dom-v5-compat, this was a real head scratcher.
The TLDR is that the CI was using Node 22.2.0 while everybody else was on Node 22.14.0 (because our policy is everyone and every thing should be running the LTS version). Tests failed for every minor version of Node before 22.12.0.
For clarity, this is only a test environment issue. Dev server and builds were not affected
Beta Was this translation helpful? Give feedback.
All reactions