I have a directory for react app, how can I make a copy of it as the template to start my next project? I did cp -r, when npm start, got Error: Cannot find module ‘../scripts/start’

The correct way to do it should be

cp -r your-react-app-template your-new-project
cd your-new-project
rm -rf node_modules/
npm install
npm start

By following these steps, you create a clean template of your React app without copying the node_modules directory, and then you install the dependencies specifically for the new project. This approach ensures a clean and consistent setup for your new projects.