In this tutorial I will show you how to fix the following error in - ReactJS "Attempted import error: 'Switch' is not exported from 'react-router-dom' "
To fix this problem:
I just uninstalled the version of react-router-dom 6.4.2 from my react project.
npm uninstall react-router-dom
and then installed react-router-dom version 5.2.
npm install react-router-dom@5.2.0
Post your comments / questions
Recent Article
- How to fix HAXM is not installed |in Android Studio
- How to fix CMOS Checksum Error in Computer or Laptop | SOLVED
- Reactivating windows after a Hardware change on PC or Laptop
- FIXED: Windows reported that the hardware of your device has changed. Error code :0xc004F211
- "redirect" is not defined pylance("reportUndefinedVariable)
- This action cannot be completed because the file is open in SQL Server(SQLEXPRESS) - FIXED
- Unicode error 'unicodeescape' codec can't decode bytes in position 2-3: truncated UXXXXXXXX escape
- Could not find the 'angular-devkit/build-angular:dev-server' builder's node package | Angular Error
Related Article