diff --git a/backend/src/index.ts b/backend/src/index.ts index be7cc283..ce201dea 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -500,7 +500,8 @@ if (process.env.NODE_ENV === 'production') { app.use(express.static('public')); // Handle SPA routing - serve index.html for non-API routes - app.get('*', (req: Request, res: Response) => { + // Using app.use middleware instead of app.get('*') for path-to-regexp compatibility + app.use((req: Request, res: Response) => { if (!req.path.startsWith('/api')) { res.sendFile('index.html', { root: 'public' }); } diff --git a/frontend/src/components/ErrorBoundary.tsx b/frontend/src/components/ErrorBoundary.tsx index a8017fac..6b4211ee 100644 --- a/frontend/src/components/ErrorBoundary.tsx +++ b/frontend/src/components/ErrorBoundary.tsx @@ -1,4 +1,4 @@ -import React, { Component } from 'react'; +import { Component } from 'react'; import type { ErrorInfo, ReactNode } from 'react'; interface Props {