Fixed: Compiled error: export 'Switch' (imported as 'Switch') was not found in 'react-router-dom' in reactJs
In React " react-router-dom" v6 , " Switch " is replaced by routes " Routes ". So, you need to update the import from import { Switch, Route } from "react-router-dom"; to import { Routes, Route } from 'react-router-dom';