hnpwa-firebase icon indicating copy to clipboard operation
hnpwa-firebase copied to clipboard

Errors when running "npm run build" - 'rm' is not recognized

Open alboteanud opened this issue 6 years ago • 7 comments

[email protected] build:clean C:\Users\albot\web\hnpwa-firebase-master rm -rf dist

'rm' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build:clean: rm -rf dist npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build:clean script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

alboteanud avatar May 28 '18 10:05 alboteanud

What kind of machine are you on?

davideast avatar Jun 01 '18 18:06 davideast

Windows 10. I think is one of the node_modules that should be installed globally.

alboteanud avatar Jun 02 '18 07:06 alboteanud

the root cause here is that rm is not a valid windows system command. there are ways in windows to recursively delete directories and their content but the *nix style command rm -rf is not one of them.

sfthurber avatar Jun 08 '18 15:06 sfthurber

Any idea how to fix this issue?

diegopitt avatar Jun 27 '18 22:06 diegopitt

Using rmdir /s along with of rm -rf? Like rm -rf || rmdir /s or even using https://www.npmjs.com/package/rimraf

dungahk avatar Oct 25 '18 15:10 dungahk

Using rmdir /s along with of rm -rf? Like rm -rf || rmdir /s or even using https://www.npmjs.com/package/rimraf

did it work?

mirinnes avatar Apr 22 '21 20:04 mirinnes

I haven't got a Windows machine to tell you, but that should work.

dungahk avatar Apr 22 '21 20:04 dungahk