Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am programming a SPA using React, ASP.net core and mysql( which this is the requirement).
I am using Visual studio 2019, I install node.js and MySQL connector and everything is connected and fine.
but one problem I have that when I ran the app, the following error occur:

{
The NPM script 'start' exited without indicating that the create-react-app server was listening for requests. The error output was: 'rimraf' is not recognized as an internal or external command,

operable program or batch file.
npm ERR! code 1

npm ERR! path C:\Users\  \source\repos\WebApplication1\ClientApp
npm ERR! command failed

npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c rimraf ./build && react-scripts start


npm ERR! A complete log of this run can be found in:

))
System.Threading.Tasks.Task.ThrowIfExceptional(bool includeTaskCanceledExceptions)

InvalidOperationException: The NPM script 'start' exited without indicating that the create-react-app server was listening for requests. The error output was: 'rimraf' is not recognized as an internal or external command,

operable program or batch file.
npm ERR! code 1

npm ERR! path C:\Users\  \source\repos\WebApplication1\ClientApp
npm ERR! command failed

npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c rimraf ./build && react-scripts start


npm ERR! A complete log of this run can be found in:

Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer.ReactDevelopmentServerMiddleware.StartCreateReactAppServerAsync(string sourcePath, string npmScriptName, ILogger logger)

}


What to do ?

What I have tried:

I have tried to reinstall and nothing happened.

I have search the web and nothing works.things I tried:
npm install in the command line and still nothg

rm -rf node_module also did not work since the command are for Linux and I am using Windows OS
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900