On Windows, npm run start works fine, but npm run start on m1 gives an error.
Why are you doing this?
Failed to compile
./node_modules/react-router-config/esm/react-router-config.js
Attempted import error: 'Switch' is not exported from 'react-router'.
This error occurred during the build time and cannot be dismissed.
"react-router-dom": "^5.3.0", "react-scripts": "^4.0.1",
This is the app.js code.
import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import routes from "./Routes";
import {renderRoutes} from "react-router-config";
import theme from './theme';
import {ThemeProvider} from "styled-components";
export default function App() {
return (
<BrowserRouter>
{renderRoutes(routes)}
</BrowserRouter>
);
};
``