This issue occurs when you copy an existing project to a new destination folder and then try to start the server using npm start
.
The development server compiles your React code, starts a web server, and serves your application locally. The development server also watches for changes in your source code and automatically reloads the browser when you make changes, allowing you to see the updates in real-time during development.
To start the development server for a React application built using Create React App, execute the following command:
npm start
How to reproduce it
Open Terminal and type:
npm start
Error
> example@0.1.0 start
> react-scripts start
sh: 1: react-scripts: not found
Solution
- Delete node_modules folder
- Delete package-lock.json file
- Open Terminal and type:
npm i
Now you can start the development server.
npm start