'How to fix the error "react-scripts' is not recognized as an internal or external command, operable program or batch file." in React projects

I have created a React project but i'm facing a problem when i try to run the react application with npm start. I tried to run npm install to create node_modules directory but during the running process, the directory is created temporarily and then automatically removed before the build process is completed. I tried some tips to fix this issue, for example npm install react-scripts, npmcache clean --force or npm cache clean --force and then npm update, npm audit fix. However, I'm still facing this issue.

I checked the react-script dependency "react-scripts": "4.0.3", which is available in package.json file.

The issue is" react-scripts' is not recognized as an internal or external command, operable program or batch file.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source