From 69b4d3686c7144b35814931cdac7f86dfd98cf38 Mon Sep 17 00:00:00 2001 From: Lifei Zhou Date: Thu, 18 Jun 2026 07:28:24 +1000 Subject: [PATCH] fix: remove hard-coded React alias that points to the wrong location and break the dev render (#9842) --- CONTRIBUTING.md | 11 +++++++++++ ui/desktop/vite.renderer.config.mts | 9 --------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e916759515..68c30776d0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -173,6 +173,17 @@ The app opens a window and displays first-time setup. After completing setup, go Make GUI changes in `ui/desktop`. +#### Troubleshooting: blank screen on `just run-ui` + +If the app opens to a blank window (logs show `Cannot read properties of null (reading 'useRef')`), your `node_modules` is out of date and is loading two copies of React. Delete it and reinstall: + +``` +rm -rf ui/desktop/node_modules +cd ui && pnpm install +``` + +See #8757. + ### Regenerating the OpenAPI schema The file `ui/desktop/openapi.json` is automatically generated during the build. diff --git a/ui/desktop/vite.renderer.config.mts b/ui/desktop/vite.renderer.config.mts index 12645e64b5..0228982d86 100644 --- a/ui/desktop/vite.renderer.config.mts +++ b/ui/desktop/vite.renderer.config.mts @@ -1,6 +1,5 @@ import { defineConfig } from 'vite'; import tailwindcss from '@tailwindcss/vite'; -import { resolve } from 'path'; // https://vitejs.dev/config export default defineConfig({ @@ -10,14 +9,6 @@ export default defineConfig({ plugins: [tailwindcss()], - resolve: { - dedupe: ['react', 'react-dom'], - alias: { - react: resolve(__dirname, 'node_modules/react'), - 'react-dom': resolve(__dirname, 'node_modules/react-dom'), - }, - }, - build: { target: 'esnext' },