-1

enter image description here

Please Solve this Issue in react js Project

I am running project in local.

  • Please share relevant code and react-router-dom version that you are using – Manish Sencha Jul 21 '22 at 11:41
  • Please [edit] your question to include your code and errors as **text** rather than as a screenshot. On stack overflow images should not be used for textual content, see [*Discourage screenshots of code and/or errors*](https://meta.stackoverflow.com/a/307500) and [*Why not upload images of code on SO when asking a question*](https://meta.stackoverflow.com/a/285557) for why. For instructions on formatting see *[How do I format my code blocks?](https://meta.stackexchange.com/q/22186)*. A [mcve] showing what you have tried that did not work would maximize your chances of getting help. See [ask]. – dbc Jul 21 '22 at 16:20

1 Answers1

0

Looks like the react-router-dom version you're using doesn't have that export anymore:

Attempted import error: 'Switch' is not exported from 'react-router-dom'

You can either downgrade react-router-dom to a lower version in your package.json by running the following commands:

npm uninstall react-router-dom
npm install react-router-dom@5.2.0

or by migrating to the new API (see this answer)