After creating the .NET Core / React & Redux project template and attempting to start the application, the react compile crashes with rimraf not recognized.
This is on Windows 10, node.js version 10.15.3. I have tried uninstalling/installing node.js multiple times and running multiple different npm commands. It seems like powershell is incorrectly linking to rimraf for some reason.
npm echo %PATH%
provides the correct path to the ./node_modules/.bin directory. And running that path followed by e.g. /rimraf
works properly. The command in package.json
is "start": "rimraf ./build && react-scripts start"
.
You can install rimraf globally using npm . It's a common module, so you can install it on any operating system that supports npm . Windows, Linux, macOS - you shouldn't have any issues here.
rimraf is an executable that is used to clean the installed node packages in a node based project. It basically executes the rm -rf command on the node_modules directory, but is a faster alternative.
I had to manually run npm install to make it work.
open command line (e.g. from Visual Studio: Tools -> Command Line -> Developer Command Prompt)
go to ClientApp (cd ClientApp
) folder of your project and type:
npm install
I finally got rid of this error by installing rimraf globally
npm install rimraf -g
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With