PatrickJS-starter icon indicating copy to clipboard operation
PatrickJS-starter copied to clipboard

'rimraf' is not recognized as an internal or external command

Open diepvv opened this issue 8 years ago • 11 comments

I run "npm start" and comandline throw error "'rimraf' is not recognized as an internal or external command" how can i fix?

diepvv avatar Mar 22 '18 04:03 diepvv

image

diepvv avatar Mar 22 '18 04:03 diepvv

rimraf is the UNIX command rm -rf for node. You need to install it with npm install rimraf -g.

vladimirradeski avatar Mar 28 '18 10:03 vladimirradeski

you just need to read the instructions in readme:

npm install webpack-dev-server rimraf webpack -g to install required global dependencies

almothafar avatar Apr 04 '18 14:04 almothafar

That's actually something that we might want to consider updating to be referenced from the local install. Since rimraf, webpack and webpack-dev-server are already listed as dependencies for angular-starter, their binaries (well, cmd's actually) are located under the ./node_modules/bin folder. So if we modify

    "clean:dist": "rimraf dist",

to

    "clean:dist": "./node_modules/bin/rimraf dist",

It should work. I'm personally not a big fan of global dependencies...

lanovoy avatar Apr 11 '18 10:04 lanovoy

Well, rimraf is very helpful even for normal user use, and in 95% of all dependencies and project that I saw or used, using rimraf.

almothafar avatar Apr 11 '18 10:04 almothafar

@almothafar Maybe, but in that case we should remove rimraf from dependencies, as there is really no point to have it installed both globally and locally, right?

lanovoy avatar Apr 11 '18 11:04 lanovoy

@lanovoy I think local one does not hurt, also, it can be helpful for running local version for deleting some folders like dist, but without global one deleting node_modules will be impossible if you run the local one.

almothafar avatar Apr 11 '18 11:04 almothafar

I have the same problem

alanhe421 avatar Oct 15 '19 15:10 alanhe421

Delete the node modules folder and do npm install. That should work.

smedavarapu1 avatar Dec 05 '19 21:12 smedavarapu1

@VladimirRadeski suggestion

rimraf is the UNIX command rm -rf for node. You need to install it with npm install rimraf -g.

solved it for me. I have to say though, i'm not a fan of installing packages globally and also i have the it installed locally in my project

jimmyFlash avatar Aug 30 '20 10:08 jimmyFlash

failed for me too. Deleted node_modules folder, get error: self signed certificate in certificate chain

furrybaer avatar Sep 24 '21 15:09 furrybaer