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

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 !

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

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…:wink:

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

1 Like

Haha! Glad you were able to sort it out :grinning: