Fix HEAD from failed vitest job due to React version conflict
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3577071. --> Reported by: [hooroomoo](https://www.drupal.org/user/3688872) Related to !676 >>> <h3 id="overview">Overview</h3> <p>HEAD vitest broken after merging in <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3571534" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3571534</a></span>. MR CI did not trigger the vitest job so did not know there were failing tests until it got merged to 1.x. </p> <p>So it seems like the issue was Workbench (new workspace package in /packages) uses React 19 which was the version that got hoisted to<code> /canvas/node_modules/react </code>and <code>UI</code> has React 18 in <code>package.json</code>. So <code>vitest</code> job got confused about multiple versions and yelled.</p> <p>The CLI build issue that just got merged <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3571534" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3571534</a></span> surfaced this because it committed a re-generated the <code>package-lock.json</code> that hoists React 19 in the root node modules.</p> <p>The old <code>package-lock.json</code> before the build issue got in was still hoisting React 18 so <code>vitest</code> was passing fine.</p> <p>So these are some options:</p> <p>- Update UI to use React 19 and fix the 14 build errors that come from upgrading the react version. I also am not sure if there are more things to worry about/have to test when upgrading to new major version. Potentially might take long.</p> <p>- Add an override to UI to use React 18 so I guess the project would have 2 versions</p> <h3 id="proposed-resolution">Proposed resolution</h3> <p>- Fix HEAD<br> - Update gitlab-ci.yaml to trigger vitest where appropriate</p> <h3 id="ui-changes">User interface changes</h3> > Related issue: [Issue #3571534](https://www.drupal.org/node/3571534)
issue