# Creating a Single-Page App in React using React Router 'npm start' not working

**URL:** <https://forum.kirupa.com/t/creating-a-single-page-app-in-react-using-react-router-npm-start-not-working/656888>\
**Category:** Uncategorized\
**Created:** [February 12, 2023, 10:08am UTC](https://forum.kirupa.com/t/creating-a-single-page-app-in-react-using-react-router-npm-start-not-working/656888 "2023-02-12T10:08:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpauwen](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@gpauwen](https://forum.kirupa.com/u/gpauwen)\
**Post date:** [February 12, 2023, 10:08am UTC](https://forum.kirupa.com/t/creating-a-single-page-app-in-react-using-react-router-npm-start-not-working/656888/1 "2023-02-12T10:08:51Z")

</div>

Hello,

I am following the above tutorial, but the ‘npm start’ command throws an error.  
I am pretty sure it has to do with my ‘package.json’ file:

→ “scripts”: {  
“start”: “react-scripts start”,

What do I need to use other than ‘react-scripts-start’ ?

Thanks for all your help in advance !

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [February 12, 2023, 6:12pm UTC](https://forum.kirupa.com/t/creating-a-single-page-app-in-react-using-react-router-npm-start-not-working/656888/2 "2023-02-12T18:12:26Z")

</div>

Hi @gpauwen - welcome to the forums. There is a very good chance that breaking changes in the latest version of React Router have made my old examples stop working.

Can you try this getting started example and see if it works for you? It is very similar to my tutorial: [Tutorial v6.8.1 | React Router](https://reactrouter.com/en/main/start/tutorial)

---

<div class="post-metadata">

**Author:** ![gpauwen](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@gpauwen](https://forum.kirupa.com/u/gpauwen)\
**Post date:** [February 12, 2023, 6:41pm UTC](https://forum.kirupa.com/t/creating-a-single-page-app-in-react-using-react-router-npm-start-not-working/656888/3 "2023-02-12T18:41:14Z")

</div>

Hello,

I made the simplest of mistakes: I forgot to change into the project directory. I was still in the parent directory. My bad…I am an absolute beginner…😉

Thanks for your response. Hopefully my next question will be somewhat more sophisticated.

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [February 12, 2023, 11:24pm UTC](https://forum.kirupa.com/t/creating-a-single-page-app-in-react-using-react-router-npm-start-not-working/656888/4 "2023-02-12T23:24:06Z")

</div>

Haha! Glad you were able to sort it out 😀
