I\'ve got a maven project, within which is JavaScript project cloned as a git sub-module. So the directory structure looks something like
mavenapp/src/main/jav
I was facing the same problem and i almost spend half on this. This worked for me you can try it
run
npm cache clean --force
then
npm rebuild
finally
npm install
Good luck
In my case, the problem had to do with not having enough file permissions for some files the react-scripts package installation was going to write to. What solved it was running git bash as an administrator and then running npm install --save react-scripts
again.
It is an error about react-scripts file missing in your node modules directory at the time of installation.
Check your react-script dependency is avaliable or not in package.json
If not available then add manually via:
npm install react-scripts --save
In my case , I edited my files on Linux where I had node v14.0.5 installed, when I rebooted to Windows where I had node v14.0.3 I got the same error. So I updated the node version on windows and all went fine for me.
If react-scripts
is present in package.json
If you see something like this "react-scripts": "2.1.3"
in your pakage.json
file then just type this command
npm install
If react-scripts
is not present in package.json
If there is nothing like "react-scripts"
in your package.json
file then probably you have not installed it.To do that type the following command and you will be all set
npm install react-scripts --save
I faced the same problem. But running the npm update command it's solved my problem.