---
title: "Discussion on \"How to Fix the TypeError: \"Module 'react-router-dom' has no exported member 'Switch'.\"\" | Hashnode"
description: "Discussion on \"How to Fix the TypeError: \"Module 'react-router-dom' has no exported member 'Switch'.\"\". While working on a project that required the creation of routes with React router, I ran into this error;\n\nTypeError: Module 'react-router-dom' has no exported member 'Switch'.\n\nDuring the debugging process, it turned out the solution was quite a sim..."
url: "https://hashnode.com/posts/how-to-fix-the-typeerror-module-react-router-dom-has-no-exported-member-switch/61b757efd2a5c9036e6ef839"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Fix the TypeError: "Module 'react-router-dom' has no exported member 'Switch'."](https://annysah.hashnode.dev/how-to-fix-the-typeerror-module-react-router-dom-has-no-exported-member-switch?utm_source=hashnode&utm_medium=feed)

While working on a project that required the creation of routes with React router, I ran into this error; TypeError: Module 'react-router-dom' has no exported member 'Switch'. During the debugging process, it turned out the solution was quite a sim...

Dec 13, 2021 · 1 min read · annysah.hashnode.dev  
Updated Dec 17, 2021  
Read the article

-   [#web-development](https://hashnode.com/tag/web-development)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#react-router](https://hashnode.com/tag/react-router)
-   [#bugs-and-errors](https://hashnode.com/tag/bugs-and-errors)

## Written by

[Anisat Ahmed](https://hashnode.com/@Anisat)

@Anisat

  
[View profile](https://hashnode.com/@Anisat)

Accessibility Specialist | Technical Writer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
